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. Quote Link to comment Share on other sites More sharing options...
Solution Guber-X Posted August 10, 2013 Author Solution 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.