CSSplay

experiments with Cascading Style Sheets

by Stu Nicholls

method 1

{width:90%; min-width:400px;} includes IE5.5 and IE6

this is the first of two ways that I have found to emulate true min-width in IE and uses an inline-block, a border-width and a negative margin (NO javascript).

this div has a min-width of 400px and a width of 90%. You can set the width as any percentage and the min-width as a px or em value.

discovered 11th May 2005 by Stu Nicholls

this div is 400px wide and can be used as a guide for min-width.

method 2

{width:90%; min-width:400px;} includes IE5.01, IE5.5 and IE6

this is the second way that I have found to emulate true min-width in IE and uses float left, a border-width and a negative margin (NO javascript).

this div also has a min-width of 400px and a width of 90%. You can set the width as any percentage and the min-width as a px or em value.

discovered 11th May 2005 by Stu Nicholls

compliant xhtml 1.1

leave your comments here

home