Should I use max-width or min-width in designing responsive web page?

Discussion in 'CSS' started by ketting00, Feb 8, 2012.

  1. #1
    Hi guys,

    As responsive layout becomes a trend, I considered re-designing my web site to be adjustable with users' device screen resolution.

    I've studied some tutorials on responsive web design on the web. Some use max-width and some use min-width with @media queries.

    The question is, with method I should go with. Anyone know which is the best?

    Thanks in advance,
    Ket
     
    ketting00, Feb 8, 2012 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    Don't use either. Except with media queries. Then use either max-width or min-width.
     
    drhowarddrfine, Feb 9, 2012 IP
  3. ketting00

    ketting00 Well-Known Member

    Messages:
    782
    Likes Received:
    28
    Best Answers:
    3
    Trophy Points:
    128
    #3
    thanks drhowarddrfine,

    I don't see any tutorial use the mixed. They flow one way with max or min width and I'm confused. Supposed I target at 480px, 768px, 1024px and larger screen resolution, which way is best and should I go with.
     
    ketting00, Feb 9, 2012 IP
  4. Andre91

    Andre91 Peon

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #4
    I make all sites with width 100% and if I have content that's floating inside my page, I calculate the width of all that floating content and set it as the min-width value to avoid layout breaking when someone minimizes the screen.
     
    Andre91, Feb 13, 2012 IP