Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Problem with aligning my header

    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.
    Last edited by Firo Prochainez; 05-25-2012 at 03:57 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    You need to have a DOCTYPE at the top. I'd recommend an HTML Strict one.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    Firo Prochainez (05-25-2012)

  • #3
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Err I never learned that in class, can ya explain this more please

    Edit: I figured it out thanks.
    Last edited by Firo Prochainez; 05-25-2012 at 04:25 PM.

  • #4
    Regular Coder LearningCoder's Avatar
    Join Date
    Jan 2011
    Location
    The Pleiades
    Posts
    925
    Thanks
    76
    Thanked 29 Times in 29 Posts
    Does everything work as expected now?

    Regards,

    LC.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •