Using multiple CSS classes

I have looked for this answer for a long time and very relieved to finally have the answer! If you’re like me, you want to be able to set up CSS classes, and ulimately combine or include other classes. But since you can’t include a class in another class (as far I know) – and when I searched for answers like this: the results always explained how to link to multiple CSS files, not how to include multiple classes. Until I ran across the second entry from that google link above.
It turns out, I was searching for my answer from the wrong direction. I was thinking that I could make a CSS class include other classes. But it turns out, how this is really used – is you can POINT to multiple CSS classes, from HTML!! I didn’t know this was possible. So, instead of doing something distasteful like this:



      background-color: #888899;

      color: White;




      border: solid 1px #7d7d7d;




      background-color: #888899;

      color: White;

      border: solid 1px #7d7d7d;


I just learned that you can have an element point to multiple CSS classes – just space-seperated, like this:



            <td class="Header Outline">




Which means you don’t have to have a bunch of nasty repeating code in your CSS file and you can make primitive CSS classes and incorporate whichever ones you need for that particular element. Very cool!
Posted in ASP.NET, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9 other followers

%d bloggers like this: