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"> </div>
<div id="topright"> </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]
|