Forum Moderators: not2easy

Message Too Old, No Replies

Setting two values for width property in DIV tag

         

pawan

7:53 am on Sep 30, 2009 (gmt 0)

10+ Year Member



Hi,

I want width to have 300 as the minimum value. In case length of item exceeds this value, it sud take auto as its value.

And width is being used as a property in Div tag.

I am using IE.

Any help will be greatly appreciated.

Regards,
Pawan

rendaw

2:33 am on Oct 1, 2009 (gmt 0)

10+ Year Member



Have you tried "min-width"? I believe it should do what you're looking for. I'm not sure about compatibility, but w3schools says it is supported by IE.

pawan

2:58 am on Oct 1, 2009 (gmt 0)

10+ Year Member



hi rendaw

Yes..i did try dat..something like....

min-width:300 and width:auto....

but in this case...it takes width as auto.

swa66

8:18 am on Oct 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IE6 doesn't support min-width.

Try adding IE7.js to teach it how to do this properly.