Wix - Create a free HTML5 website

CSS classes

Pre 2006

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.

copyright © stu nicholls - CSS play

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.



  • Each week the Creare Group produce video tutorials for SEO and tips and tricks for the web design industry.

Recommended Sites


Please Support CSS play

CSS play Recommend

Free, practical CSS menus, layouts, and examples

Follow CSS play


Facebook   Twitter   Facebook Fan Page

Just CSS | Designs for the future

Like the CSS Zen Garden?
Then why not visit Just CSS and see it you can design for the future.