Jump to content

CSS question...


Guber-X
Go to solution Solved by Guber-X,

Recommended Posts

I have a accordion menu that uses unique IDs for each CSS menu. the accordion menu is not mine but was free from the internet http://www.script-tutorials.com/pure-css3-accordion/

 

if you look at the CSS you will see this: 

#tab1:target ~ .tabs .tab1 dd div {
    height: 100px;
}
#tab2:target ~ .tabs .tab2 dd div {
    height: 345px;
}
#tab3:target ~ .tabs .tab3 dd div {
    height: 235px;
}
#tab4:target ~ .tabs .tab4 dd div {
    height: 235px;
}
#tab1:target ~ .tabs .tab1 dd a,
#tab2:target ~ .tabs .tab2 dd a,
#tab3:target ~ .tabs .tab3 dd a,
#tab4:target ~ .tabs .tab4 dd a {
    filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#e6e6e6,EndColorStr=#dcdcdc);
    background-image: -moz-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: -ms-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: -o-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#e6e6e6),color-stop(100%,#dcdcdc));
    background-image: -webkit-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: linear-gradient(to bottom,#e6e6e6 0,#dcdcdc 100%);

    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;
    -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;
    -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;
}

as you can tell each tab has its own unique ID, now I am using PHP array to fulfill my accordion menu to display different information of a single product. My question is that is there a way to turn the CSS tabs into a array so I don't have to add more tags for the same styling?

 

PS. I did modify how it looks for my project, thats about it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.