Jump to content

[SOLVED] classes???..


galvin

Recommended Posts

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. 

Link to comment
https://forums.phpfreaks.com/topic/140359-solved-classes/
Share on other sites

you need to seporate the classes with a comma not a space. If you seporate it with a space its telling it to style a class within a class. so for what you want you could put

.name1, .name2, .name3 {
css: code here;
}

 

Or why not make it even simpler like Mchl said and give them all the same class

Link to comment
https://forums.phpfreaks.com/topic/140359-solved-classes/#findComment-735153
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.