galvin Posted January 11, 2009 Share Posted January 11, 2009 Sorry, this isn't a PHP question but you guys are so smart I'm sure I can get a quick answer here.... If throughout my code I have a bunch of classes like name1, name2, name3, etc. etc through name50, is there a way to write the CSS just ONCE, so that it styles the same thing for all of those different classes. Essentially, I'd want something like the following where X could be any number... .nameX { } ...rather than have to do... .name1 { } .name2 { } .name3 { } and so on. Quote Link to comment https://forums.phpfreaks.com/topic/140358-solved-classes-in-css/ Share on other sites More sharing options...
bubbasheeko Posted January 11, 2009 Share Posted January 11, 2009 This should be posted here: http://www.phpfreaks.com/forums/index.php/board,5.0.html Quote Link to comment https://forums.phpfreaks.com/topic/140358-solved-classes-in-css/#findComment-734483 Share on other sites More sharing options...
galvin Posted January 11, 2009 Author Share Posted January 11, 2009 didn't know they had a CSS section here, thanks for the heads up.. Quote Link to comment https://forums.phpfreaks.com/topic/140358-solved-classes-in-css/#findComment-734485 Share on other sites More sharing options...
Philip Posted January 11, 2009 Share Posted January 11, 2009 .name { Put main stuff here } .sub1 { little changes between types } .sub2 { little changes between types } class="name sub1" class="name sub2" Quote Link to comment https://forums.phpfreaks.com/topic/140358-solved-classes-in-css/#findComment-734486 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.