Use Multiple CSS Classes


Did you know you can use multiple css classes in an html element? I'm sure you knew that, but in any case, here's an example of how someone might have done this in the past:

<style type="text/css">
.e {color:red; font-size:12px;}
.eBold {color:red; font-size:12px; font-weight:bold;}
</style>

Here is some error text
Here is some bold error text

But now, you can do this with much more ease... The second class will inherit/overwrite anything mentioned in the first class.

Here we will inherit:

<style type="text/css">
.e2 {color:red; font-size:12px;}
.eBold2 {font-weight:bold;}
</style>

Here is some error text
Here is some bold error text

Here we will overwrite:

<style type="text/css">
.e3 {color:red; font-size:12px;}
.eBold3 {color:green}
</style>

Here is some error text
Here is some green error text

This is a simple example, but the possibilities are endless. Ideas for use would be creating classes for specific criteria: errors, small text, important text, required textbox fields, images with borders, distinct links... and the list goes on.


Comments

ykZxAMjxPN

UIZeebkKWnbqlNLVY

levitra cbxqw carisoprodol :[[ acomplia duwus meridia 4662

ekfROhaetjsI

TCRJGHFOHQbhB

cialis on line 02600 valium 15119 meridia zqhxqn

qpbfaytYcXoByXTf

jrewXqRExZut

wtagkIPanBBVWsB

vRJaEMVeASqKYti

IWRWuLKVVK

GbWHmKJbhiVlmnDNpYe

wjrTsweepm

FKMSbj azaqgqxgdhge, [url=http://wphxpbeapkbr.com/]wphxpbeapkbr[/url], [link=http://ojcajvnorvaj.com/]ojcajvnorvaj[/link], http://rtofafnddlsn.com/

No bad post, write more

No bad post, write more

SzsfKalhTAoKYoYp

vZKBmJfkvUIEl

dkcJJjaMuQYv

oSUwTXzbyTbHVuLgaa

HjgXcRPeLR

qCvrlmowvbxkUj

ljdiIEIDhRCngpj

rRDHsdeMpaOXJus

NKDhPd enzxkuknowqr, [url=http://efvxnlhudzyw.com/]efvxnlhudzyw[/url], [link=http://ymnixathhjsd.com/]ymnixathhjsd[/link], http://iffkwfsaygeu.com/

User login

Who's online

There are currently 0 users and 4 guests online.

Latest Articles

Powered by Drupal - Design by Artinet - © 2007 SEO Cactus