Yes. You want to use the min-width property as well as setting the display for your images to 'block'.
For example:
CSS:
.box-c { width: 900px; border: 1px solid #000; }
.box-c img { border: 1px solid red; display: block; }
.box-c .one, .box-c .two, .box-c .three {
min-width: 200px;
width: auto!important;
width: 200px;
float: left;
border: 1px solid green;
}
HTML:
hello
hello
hello
So here we have three columns with a min-width of 200px each. In the first column I've inserted an image of 300px -- this should give you a rough idea of what's going on. If you comment out the image from the HTML, the div shrinks back to 200px wide like the others.
One thing to note: IE6 does not support the min-width property. I've included a workaround in the CSS to accomodate IE6 (and it's really the best one out there):
.box-c .one, .box-c .two, .box-c .three {
min-width: 200px; /* read by standards compliant browers like Firefox and Safari */
width: auto!important; /* read by IE6 */
width: 200px; /* read by IE6 */
float: left;
border: 1px solid green;
}
Good luck!
2007-11-28 15:56:00
·
answer #3
·
answered by achtungbaby 3
·
0⤊
0⤋