treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] How to make site width adjust to screen size

  • Hi,

    I was wanted to make my blog's site width large around 1400px, but adjust when people are viewing it on a lower resolution or as they adjust the browser width. A good example of this would be http://mashable.com. CSS-Tricks does this a little as well with adjusting the layout of the menu. I'm not sure if this can be done with only CSS.

  • @greenhoe

    .wrapper {
      width: 90%; //Or whatever number you desire, as long as it's a percentage
      max-width: 1400px;
    }
    

    looks like mashable uses 100%, where css-tricks uses 96%

  • Thank you Chris, What is the difference between using width% and min-widht?

  • you mean max-width? max-width defines the largest the wrapper can be, in your case, 1400px, where width defines the size, so 100% means fill the page, unless the page is larger than 1400px..in which case, it stops growing there.