Hey guys,
Here’s what happened:
I created a container, like so:
#container {
margin: 0 auto;
width: 960px;
background-color: #FFF;
border: 1px solid;
}
then I created the container div on my HTML document like so:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>title</title>
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
</head>
<body>
<div id="container">container</div>
</body>
</html>
And I see this mysterious top margin, here:
The problem occurs on Chrome, Firefox and IE8 (also, the height of the margin seems to be greater on the IE).
Could this be because of the DTD I am using? I am not very adept with DTD’s as yet (neither am I an adept at CSS, evidently lol)
Thanks!