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 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2010
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    min-width question

    I can't Understand the css declaration below. What does it do? Is there a specific layout design it want to achieve? Why declare a min-width then width:100%?
    Code:
    #body
    {
    min-width:1200px; width:100%;
    }

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by Anishgiri View Post
    Why declare a min-width then width:100%?
    I'm guessing the author wants a minimum layout width of 1200 pixels, but otherwise wants the layout to be as wide as the browser viewport. For viewport widths of less than 1200 pixels, the result will be a 1200-pixel-wide layout with content out of view at the sides of the viewport.

    Sounds like a bad idea to me since users with small screens/resolutions will get a poor experience that requires horizontal scrolling to view the page.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    Regular Coder
    Join Date
    May 2010
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Arbitrator View Post
    I'm guessing the author wants a minimum layout width of 1200 pixels, but otherwise wants the layout to be as wide as the browser viewport. For viewport widths of less than 1200 pixels, the result will be a 1200-pixel-wide layout with content out of view at the sides of the viewport.

    Sounds like a bad idea to me since users with small screens/resolutions will get a poor experience that requires horizontal scrolling to view the page.
    The whole code has a mobile css(media query).


  •  

    Posting Permissions

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