Treehouse: Grow your CSS skills. Land your dream job.

Div not changing % width when container padding changes

  • # June 22, 2012 at 11:14 am

    I’m having a problem with a div not changing its percentage width when the container it’s in (with relative positioning) changes padding.

    CodePen here:

    # June 23, 2012 at 6:07 am

    The weirdest thing is that I don’t get the bug in Mobile Safari, only on Desktop browsers (Opera, Chrome, FireFox and Safari).

    # June 23, 2012 at 6:58 am

    works for me

    # June 23, 2012 at 8:23 am

    All that happens for me is that it moves; its `margin: 10px auto;` doesn’t kick in, and its `width: 70%;` doesn’t happen either.
    It’s only when I resize the browser that it works.

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

You must be logged in to reply to this topic.