Jump to content

CSS question...


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
https://forums.phpfreaks.com/topic/280976-css-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.