diconn
11-28-2010, 03:09 PM
I have a problem with floated divs in Opera/Safari
<body style="width:98%; padding:0 1%; margin:auto;">
<div style="width:75%; float:left; background:red; height:40px;"></div>
<div style="width:25%; float:left; background:green; height:40px;"></div>
<div style="clear:both"></div>
<div style="width:100%; background: blue; height:40px;"></div>
</body>
If you open this in FF and IE everything looks fine.
In Opera and Safari I have these 2 floated divs width 1px short against this blue. If you change browser window (by stretching in a window mode) you'll see this width is briefing 1px. Any idea about that?
<body style="width:98%; padding:0 1%; margin:auto;">
<div style="width:75%; float:left; background:red; height:40px;"></div>
<div style="width:25%; float:left; background:green; height:40px;"></div>
<div style="clear:both"></div>
<div style="width:100%; background: blue; height:40px;"></div>
</body>
If you open this in FF and IE everything looks fine.
In Opera and Safari I have these 2 floated divs width 1px short against this blue. If you change browser window (by stretching in a window mode) you'll see this width is briefing 1px. Any idea about that?