Understanding CSS Classes
re-written by John, originally written by StuWhile CSS classes might not be new to some people, they are to others so I'm hoping with this brief and simple tutorial I'll be able to give some people out there a little more understanding at how CSS is handled. Below is a block of text that I'll be using as a guide.
This shall be a normal line.
Some folks like green text and blue
How about some bold and green text?
And we can Join as many classes as you'd like.
This shall be a line of text within a <p> tag
Here is just some simple Big and Small textSome folks like green text and blue
How about some bold and green text?
And we can Join as many classes as you'd like.
<div class="underCSS">Source CSS
This shall be a normal line.
<p>This shall be a line of text within a <p> tag</p>
Here is just some simple
<span class="CSSbig">Big</span> and <span class="CSSsmall">Small</span> text<br />
<span class="CSSgreen">Some folks like green text</span> and <span class="CSSblue">blue</span><br />
How about some <span class="CSSbold CSSgreen">bold and green</span> text?<br />
And we can <span class="CSSbig CSSgreen CSSbold">Join</span>
<span class="CSSsmall CSSblue">as many</span> <span class="CSSbold">classes</span> as you'd like.
</div>
The css below, would be placed between your Style Tags
.underCSS {background:#222; padding:3px;}
.underCSS p {text-indent:10px; margin:0; color:red;}
.underCSS .CSSbig {font-size:20px;}
.underCSS .CSSsmall {font-size:10px;}
.underCSS .CSSgreen {color:#00ff00;}
.underCSS .CSSblue {color:#6e9dd4;}
.underCSS .CSSbold {font-weight:bold;}







