Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] find percentage for page wrapper?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #161893
    claire2013
    Participant

    I’m creating my own site. Right now it is a fixed layout and I’m trying to make it responsive.

    I know in order to change the width from px to %, you need to divide the target by the context.

    How would I use this method with the page wrapper, or the page itself? My page itself is 1278px. What would I divide this number by? the browser window?

    There are many browser sizes so I’m not sure if that would be the right approach.

    Thanks in advance

    #161902
    TheDoc
    Member

    I’m not entirely sure what the question is. If you’re page is currently 1278px wide, you could do something like this:

    .page-wrapper {
        width: 100%; /* might not be needed, since the div should default to this already */
        max-width: 1278px;
        margin: 0 auto;
    }
    
    #162004
    claire2013
    Participant

    Thanks. I wasn’t sure how to ask the question myself. I dug around for some responsive sites and noticed the developers set their .wrapper/.container to min-height: 100% and no width so I figured it wasn’t needed.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.