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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2011
    Posts
    265
    Thanks
    49
    Thanked 1 Time in 1 Post

    What is pushing a DIV past 100% width?

    Hi,

    This website's #container_header is stretching out to the right, past the width of what a 100% width DIV would occupy.

    For instance, in my browser on my laptop, the width of #container_navigation is 1265px wide, which is 100% of the width of my browser.

    However, #container_header is 1305px wide.

    Can you see what is pushing the width of #container_header past 100% of my browser's width?

    Thanks.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello SRD75,
    The box model rule says you need to add margin and padding to your total width. What is 100% plus 40px padding?

    See if you like this better:
    Code:
    #container_header, #container_navigation, #container_content, #container_widgets, #container_footer {
        display: block;
        /*width: 100%;*/
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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