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

Min/Max Width & Floats

  • Hello,

    I am new to the forum here. I am trying to create div's that will automatically resize. I am making a 3 column design (#content, #left, #right) that will run on a CMS, and when the CMS doesn't output one of the columns, I want #content to resize and use the availible space.

    It seems like I could use min- and max-width to do this, but I need some help. Here is a drawing of what I am trying to do, with the left side being ideal and the right side being what happens.

    For SEO purposes, the nesting order inside #wrapper is: #content, #right, #left

    What am I missing? And is this the best way to go about doing this?

    Thank you,
    -Mtro
  • i couldnt see drawing as it required login

    but i think you need to look for css grids which have option for
    fluid width.

    google might help :)

    let me know if you need more help.
  • Here's a different link. http://www.48dutch.net/mitch/min-max-float.png

    Maybe it's overkill, though. A more simple question: how do I create resizable divs in css, with no special html/php, that will shrink when sharing a wrapper with floats?

    I've definably googled a good bit, but this is either too specific for a good search, or there's terminology that I don't know. As far as grids, I'm somewhat new to CSS and am trying to learn from the ground up, so that when I start using grids (or base themes in CMS), I'll understand how they are working.

    Thanks again!