Here's what happened:
I created a container, like so:
margin: 0 auto;
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">
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
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)
DTDs won't cause this :). It's probably the margins set on the body element.
Although I think you should know that having an XML declaration above the doctype will trigger quirks mode in IE. Remove that XML declration. Nothing should be above the doctype
YOU SIR, I WOULD LIKE TO SHOW MY GRATITUDE BY THANKING YOU VIA ALL-CAPS!
And I'll remove the XML declaration also
You're welcome lol :). I was going to respond back in all caps but it keeps turning it into capitalized words and not uppercase..drats..:p