SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    blahblahblah
    Posts
    1,447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    width or min-width?

    Which would you consider best practice? Should I allow the width of a box to go below what I want it to be?

    Regards,

    -jj.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    It's up to you, really, and depends on circumstances. Sometimes it's practical to set a min-width so that the container doesn't get smaller than things like images within it. Do you have an example to apply this to?
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    As Ralph said it depends.

    If the layout breaks below a certain with and is unusable then there's no point in letting it get smaller unless you can maintain legibility etc.

    If the element contains fixed width content (such as an image) then again there's no point in letting the parent be smaller than the largest fixed width element it contains - which is something you should really do by default otherwise background and borders continue to get smaller while some elements of the page poke out the side.


Bookmarks

Posting Permissions

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