Sunday, April 12, 2009

css id and class

Usage of class and id in CSS for DIVs

.newsRowText {
color:#333333;
margin:10px;
line-height:22px;}

.newsRowText#errors {
color:#CC0000;
margin:10px;
line-height:22px;
}

<div id="errors" class="newsRowText">Error Message</div>
<div class="newsRowText">Normal Message</div>

No comments: