...

View Full Version : Problem with aligning my header



Firo Prochainez
05-25-2012, 03:52 PM
Hi, as you can queses I'm working on a website.
Iv been working on a template for 2 days and I;m done with it :)
Now i'm in the coding portion of my website but I ran into an unexpected problem.

I centered aligned my headerwrapper with "margin:0 auto;"(code also below).
The problem is that my headerwrapper is not aligned in Internet Explorer 9 but it works in Google Chrome,FireFox, and Safari.

Im running windows 7 just to let ya guys know.


Here is a list of web browsers i'm testing my website in:

Internet Explorer 9
Google Chrome
FireFox
Safari

If there is any more I should test in Just tell me.

HTML CODE:

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>LearnComputers.com</title>
</head>
<body>
<div id="wrapper">
<div id="headerwrapper"></div>
</div>
</body>
</html>

CSS CODE:

body
{
margin:0px;
height:0px;
}
#wrapper
{
width:100%;
height:100%;
background:e6e6e6;
}
#headerwrapper
{
width:1383px;
background:#232323;
height:97px;
margin:0 auto;
}


THANKS

Edit:works in live view as well in Dreamweaver.

abduraooft
05-25-2012, 04:08 PM
You need to have a DOCTYPE (http://www.alistapart.com/articles/doctype/)at the top. I'd recommend an HTML Strict one.

Firo Prochainez
05-25-2012, 04:11 PM
Err I never learned that in class, can ya explain this more please

Edit: I figured it out thanks.

LearningCoder
05-26-2012, 02:18 AM
Does everything work as expected now?

Regards,

LC.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum