Code Example #2 – Super Cool Alignment Classes!


Todays code example is really more of a fluke. I have always found myself trying to write interchangable and easily updatable html and found that since i moved to CSS that is more of a challenge. Instead of trying to write different classes that would handle everything you need and trying to make them very specific you can break things down into simpler forms.

.align-center
{
   text-align: center;
}
.align-left
{
   text-align: left;
}
.align-right
{
   text-align: right;
}

and you use them as follows:

Leave a Reply