width. Replaced elements use their intrinsic width by default, but non-replaced elements have no intrinsic width. They will tend toward zero width in conformant browsers if no width is defined.img#one {float: left; height: 50px; width: 40px; margin: 10px;}
img#two {float: left; height: 35px; width: 35px; margin: 15px;}
Now assume that we have the following situation in a document:
<img src="woodee.jpg" id="one"><img src="hoosa.gif" id="two">How will the images be placed with respect to each other, and how much space will separate the outer edges of the two images' visible contents?
<body> <div id="nav">...</div> <div id="main">...</div> </body>Modify or add to, but do not delete anything from, the following styles such that the result will be as shown in the diagram. Note: you do not have to worry about element heights, but you should reproduce the horizontal separation between the elements and the left and right edges of the design area.
div#nav {float: left;}
div#main {float: none;}
One possible answer:
div#nav {float: left; width: 30%; margin: 0 1% 0 2%;}
div#main {float: none; width: 60%; margin: 0 7% 0 33%;}
This will leave open enough room for the "nav" div to float without impinging on the content of the "main" div.