What is the different of class and id in CSS?
Please see an example first:
In my CSS class of my blog I defined a class name
section-w {
border-top:none;
padding:14px;
margin-bottom:11px;
}
and a class name
#main_left {
width:551px;
float:left;
line-height:18px;
display:inline;
border-top:none;
border-right:solid 1px#DEDEDE;
}
and for 'section-w' as :
<div class="section-w" id="categories">
....
</div>
and
<div class="section-w" id="adsense-sidebar">
....
</div>
and I applied it in HTML code 'main_left' for as:
<div id="main_left">
<table width="551" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td width="551">
....
</td></tr></tbody></table>
</div>
So you can see the different between class and id is:
Class can be used for many times in HTML code, but id can be used one time.
|
|
Save to Delicious with other 0 happy readers
Home
Blogger
Wordpress
Joomla
Other
Contact me
Feed RSS
2008 Web template design |
Hi my friend
Here i would like to show you our experience with Google Adsense
www.Google-adsense-Press.blogspot.com
on the link :
1- Get all you need to know about google adsense
2- Learn adsense Secrets with joel comm and the money press team
3- Watch free training videos about google adsense
4- Download the most popular books
5- ask the internet markiting experts
and more at:
www.Google-adsense-Press.blogspot.com
Thank you , and be sure : you will know the adsense secrets FREE
and our blog is update daily
www.Google-adsense-Press.blogspot.com
Money Press Team
Post a Comment