I'm a div with DIVs

Miscellaneous Forums/General Discussion/I'm a div with DIVs

Heya,

Working on a website at the mo, and I've got a cross-browser compatibility problem. Take a look at http://union.ic.ac.uk/halls/pcourt/new/ in IE and click on the News tab. This is how I want it to look. Now look at the News page in Firefox - it's a mess! Can you see what I'm doing wrong from this code?

news.html:
<html>
<body>

<head>
<link rel="stylesheet" type="text/css" href="../style.css">
<link rel="stylesheet" type="text/css" href="news.css">
</head>

<div class="container">

<h2>News</h2>

<div class="left">

(content)

</div>

<div class="right">

(content)

</div>

</div>

</body>
</html>


news.css:

div.left {
	padding: 10px;
	border: 3px solid #009933;
	width: 250px;
	float: left;
}

div.right {
	padding: 10px;
	border: 3px solid #009933;
	width: 480px;
	float: right;
}


style.css:

div.container {
	position: relative;
	margin: 0 auto;
	width: 748px;
	height: 100%;
	text-align: justify;
}

(+ other stuff)


Thanks,

Ryan

If it is related to this problem:

http://www.thescripts.com/forum/thread99560.html

then the Firefox version is supposed to be the correct one.

Thanks Foppy, that was just the info I needed, fixed it!

Firefox was right (as always) - solution: Add a doctype declaration and reduce the width of the two div boxes by 26px.

Thanks :)

Aren't you supposed to not nest <div>'s? It's valid XHTML to nest them, but I thought it was one of those things that are frowned upon (like GOTO in basic or french-kissing at a family reunion).