Forums

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

Home Forums CSS Website Stretching on a Big Screen Desktop Computer

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #45563
    CodeGraphics
    Participant

    Just opened my website on LG big flat screen desktop computer and the pages stretched all the way to the left and right. Although it didn’t have a horizontal bar because the website is actually responsive, but it didn’t have a single pixel of white space at the right and left sides. Whereas the width of the web pages is 1000px. What made the page to stretch to cover the full width of the screen? Do I need to make the width like this:

    .container{
    max-width:1000px;
    }

    #138888
    Kitty Giraudel
    Participant

    Yes. If you didn’t specify any (max-)width, block-level elements had the full width of their parent (default 100%).

    #138893
    CodeGraphics
    Participant

    Ok. So I should give it only max-width or should I do something like this:

    .container{
    width:1000px;
    max-width:1000px;
    }

    #138895
    Kitty Giraudel
    Participant

    No. This will lead to an horizontal scroll bar when < 1000px. Just a max-width will be alright.

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