Previous Message
Next Message

Floats not floating in IE

Sent by Mark Wheeler on 29 November 2006 17:05


Hi all,

So in my quest to use less absolute positioning (why, because I  
wanted to try it.) I've come up against some floats not floating next  
to each other. I've written a short test page here, and the css is in  
page.

http://www.tonedeafstudios.com/test/test21.html

And here is the very short code.

<CODE>----------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Untitled</title>
<style type="text/css" title="text/css">
/* <![CDATA[ */
html, body {
	padding: 0;
	margin: 0;
}

body   {
	font-size: 12px;
	font-family: "Trebuchet MS", "Gill Sans", Verdana, Tahoma, sans-serif;
	line-height: 150%;
	color: #000;
	background-color: #292b68;
	min-width: 775px;
	text-align: center;
}

#wrapper  {
	text-align: left;
	margin-right: auto;
	margin-left: auto;
	position: relative;
	width: 775px;
}

#header_left {
	float: left;
	background-color: green;
	width: 171px;
	height: 168px;
}

#header_right {
	background-color: red;
	width: 604px;
	height: 168px;
	margin-left: 171px;
}
/* ]]> */
</style>
</head>
<body>

<div id="wrapper">

<div id="header_left"></div>
<div id="header_right"></div>

</div>

</body>
</html>

</CODE>-----------------------------------------------------


It's one div floated left against another div, but in IE6 it floats  
the div left, but then the adjacent div is kitty-corner to floated  
div. I'm sure there is a bug in IE regarding this, but I've looked  
and can't seem to find it.

The two divs have stated heights and widths and are enclosed in a  
wrapper to center the whole thing on the page.

Any help would be great.

Thanks,

Mark
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: