Odd CSS float and clear bug? -
Odd CSS float and clear bug? -
i have odd problem while working on little site.
i can't wrapper wrap around of other divs correctly. code looks this:
<body> <div id="wrapper"> <div id="header"> <div id="menu"> </div> </div> <div id="content"> <div id="text"> <form></form> </div> <div id="contact"><img /> <map name="map" id="map"> </map> </div> </div> <div class="clear"></div> </div> </body> and css:
body { margin: 0px; background-image: url(../images/bg.jpg); background-repeat: repeat-x; } #wrapper { margin-right: auto; margin-left: auto; margin-top: 0px; } #header { height: 560px; width: 1190px; margin-right: auto; margin-left: auto; background-image: url(../images/header.jpg); background-repeat: no-repeat; } #menu { width: 640px; position: relative; left: 350px; top: 115px; } #content { width: 1190px; margin-left: auto; margin-right: auto; position: relative; top: 10px; } #text { width: 550px; float: left; margin-bottom: 20px; position: relative; left: 180px; } #contact { float: left; margin-bottom: 20px; position: relative; left: 230px; top: 50px; } .clear { clear: both; } the wrapper seem wrap on of pages not all, , if specify size of image in #contact fail on other pages aswell. however, wrap #text div.
am pleased help!
best regards robert
the position: relative; style attached contact div messing wrapper near bottom. if remove style , switch out offsets margins instead, wrapper div wraps correctly across content divs. have set illustration code here: http://jsbin.com/eqecev/2/edit#preview
css css-float clear
Comments
Post a Comment