HTML and CSS Reference
In-Depth Information
Time to put all this knowledge about floating and positioning to the
test! Take a look at the web page below. There are four elements with
an id. Your job was to correctly match each of those elements with the
CSS rules on the right, and fill in the correct id selector for each one.
Here's the solution. Did you get them all correct?
div id=“header”
div id=“navigation”
#main
{
margin-top: 140px;
margin-left: 20px;
width: 500px;
}
div id=“main”
img id=“photo”
p
# navigation
{
position: absolute;
top: 20px;
left: 550px;
width: 200px;
}
#photo
{
float: left;
}
#header
{
position: absolute;
top: 20px;
left: 20px;
width: 500px;
height: 100px;
}
 
Search WWH ::




Custom Search