Grow your CSS skills. Land your dream job.

White space when shrinked (also on mobile)

  • # March 4, 2013 at 1:16 pm

    So my “mother” div is set to 100% and my “normal” div is 1000px. I ussualy work like this and it works but now if you see
    [HERE](http://codepen.io/markomarkogame/pen/blLCa “HERE”) when you shrink the browser window some white space appears also it looks like that on mobile (smaller screen ofc).

    It’s the second div with blue background.

    [NORMAL](http://i.imgur.com/4QnexVj.jpg “NORMAL”)

    [SHRINKED](http://i.imgur.com/GVSsN68.jpg “SHRINKED(mobile)”)

    Strange and what could be causing this

    # March 4, 2013 at 2:12 pm

    Set min-width: 1000px; to the parent div. It is child div’s full width that creates the empty space while 100% can be less than 1000px.

    # March 4, 2013 at 2:31 pm

    Thanks but how to adjust this for responsive ? The middle div looks weird now with media queries.

    # March 4, 2013 at 2:46 pm

    For example if your look at this [site](http://www.richard-carpenter.co.uk/ “site”)
    for footer the parent doesn’t have min-width when it shrinks to work properly like i have to …

    Don’t get it

    # March 4, 2013 at 2:55 pm

    If you give your container a width of 100% then that’s all you get. That may be the source of your problem. Remove the 100%. There is no reason for it anyway.

    # March 4, 2013 at 3:35 pm

    There is still white space as it seem a bit smaller now, is it maybe cause by padding ?

    Here’s the (http://codepen.io/markomarkogame/pen/blLCa “code”) also [IMG](http://i.imgur.com/hg2hWx2.jpg “IMG”) (white space on the right when shrinked) . I was without that space for a while then it occured. Please help[code](http://codepen.io/markomarkogame/pen/blLCa "code") also [IMG](http://i.imgur.com/hg2hWx2.jpg "IMG") (white space on the right when shrinked) . I was without that space for a while then it occured. Please help

    # March 4, 2013 at 4:00 pm

    Also same on my Android, little white space on the right. Check it out

    solved: Problem padding I’ve done in the child element

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".