skip to content

CSS classes

This is a normal sentence.
This is a big red BUS.
This is a small blue CAR.
So you can see that it is possible to join up as many classes as you like.

Information

Just a simple demonstration of a fact that is not obvious for someone trying out css for the first time.

IT IS POSSIBLE TO JOIN CLASSES TOGETHER!

For the above example I have defined separate classes for 'big', 'small', 'redtext', 'bluetext', 'italic' and 'bold', and combined them in several ways to get what I want.

xhtml

<div id="demo">
This is a normal sentence.<br />
This is a <span class="big">big</span>
<span class="redtext">red</span>
<span class="big redtext bold">BUS</span>.<br />
This is a <span class="small">small</span>
<span class="bluetext">blue</span>
<span class="small bluetext bold">CAR</span>.<br />
So you can see that it is possible to 
<span class="big bluetext bold italic">join up</span>
as many <span class="big redtext bold">classes</span> 
as you like.
</div>

Copyright

You may use this method on your personal 'non-profit' web site without seeking my permission. A link back to CSSplay is always appreciated.

Commercial usage is also permitted without seeking approval, but I would ask that a donation is considered to support my work on CSSPlay.

If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.




Recommended Sites

CSSplay web design/assistance

"The citroen.co.uk web site uses
CSS Play code for the site drop down menus.
This code works seamlessly in IE 6 & 7, and is an excellent solution to the Creative requirements of the site."

Damon Clark - Brandwidth


Advertise with CSSplay

CSS play pages

CSS (Design) - TOP.ORG

CSS play recommend

Free, practical CSS menus, layouts, and examplesSitegrinderPSD to HTML