Guber-X Posted August 9, 2013 Share Posted August 9, 2013 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 More sharing options...
Guber-X Posted August 10, 2013 Author Share Posted August 10, 2013 okay, well i solved my own problem... just did a slight adjustment to how my database works with the tabs. Link to comment https://forums.phpfreaks.com/topic/280976-css-question/#findComment-1444272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.