You are here: css - nested id's ? « HTML « IT news, forums, messages
css - nested id's ?

Posted by julian_m on 02/14/06 09:03

I can't figure out the meaning of the nested # in css. See below pls

Lets say I've got the following html:


<div id="roundedbox">
<div id="top">
<div id="topleft">&nbsp;</div>
<div id="topright">&nbsp;</div>
</div>
</div>


and the css is

#roundedbox {
background: rgb(255,255,204);
float: top;
margin: auto;
width: 90%;
}

div#roundedbox #top {
font-size: 1px;
height: 15px;
line-height: 1px;
}

div#roundedbox #topright {
background: url(round1.png) no-repeat top right;
float: right;
height: 15px;
width: 15px;
}



1)
Why div#roundedbox ? Is it the same as #roundedbox?
2)
What is div#roundedbox #top
It seems as some kind of hierarchy between roundedbox and top..
Wouldn't be the same div#top or just simply #top (given that both are
ID's)?

3) How can I do to achieve the same but using classes instead of id.
Note that I'll use the code more than once in my html...

regards! jm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация