width or min-width
Hi guys. I'm just wondering when I should use width and when I should use min-width. I thought there wasn't really a difference but after a day messing around with a site layout trying to get stuff to fit together... I gueass I was wrong.
Well, the main difference is that older browsers (IE6 and earlier I think) don't recognize the min-width feature. Try looking at this article too - http://www.mezzoblue.com/archives/20...5/sidestepping - it describes how to overcome this.
Also min-width is fluid when the window size is larger than your set value, whereas width is simply fixed.
Last edited by timdenty; 05-29-2007 at 06:32 AM.
Cheers. I have a site that's needing a complete redesign. I laid it out with absolutely positioned divs, and now I'm being asked to center it all. I guess that's what I get for cutting corners eh?
Just a thought - You could still use absolute positioning & have it center aligned. You would just have to have all your elements within a container which was relatively positioned with correct margins like this...
margin: 0 auto;
The child elements then take their position from the parent element (container), not the body.
Cheers Tim. That sure does beat the hell out of a complete re-coding.
using absolute positioning unless elements are to overlap is unnecessary and just makes the coding much more complex. You can't centre absolutely positioned elements because they are positioned relative to a single location, not multiple locations..
Really the layout I'm after can be put into 3 columns. It's not as tidy to code as I would have preferred but I've just gone with 3 floating columns and I just need to work out the positioning of things.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)