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
    Regular Coder
    Join Date
    May 2011
    Location
    new york
    Posts
    118
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Div background disappears when the window is resized

    When the window loads, it creates a static width of the background for the header/footer at the size of the initial load of the window.

    So when the window is resized, it leaves a nasty white empty background that looks bad. I've attached a screenshot here:

    Could anyone direct me to how I could solve this?

    http://goo.gl/7iE3sZ

    Last edited by phpchick; 05-17-2014 at 12:18 AM.

  • #2
    Regular Coder
    Join Date
    May 2011
    Location
    new york
    Posts
    118
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I realize I could use overflow-x:hidden on the body, but then the horizontal scroller would disappear and thats not exactly the solution I would like. I still want people to be able to navigate horizontally if they have to.

  • #3
    Regular Coder
    Join Date
    May 2011
    Location
    new york
    Posts
    118
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Wanted to update this thread in case anybody else had any problems.

    I solved this by using min-width

    Set the min-width to a spot just beyond where the issue begins to occur. In my case it was the html body{} itself.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,004 Times in 977 Posts
    Glad you solved it and sorry that I didn’t see this earlier, or I would have replied much sooner.


  •  

    Posting Permissions

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