width:auto; not working in IE |
width:auto; not working in IE |
deadrabit |
Sep 10 2008, 09:21 AM
Post
#1
|
Group: Members Posts: 7 Joined: 8-September 08 Member No.: 6,618 |
heyya.
in my site menu i previously used width:auto; with display:block; to display a box around the text when you hovered over it however copying into my new website seems to of broken it... so why doesnt width:auto work in IE? thanks D.R |
deadrabit |
Sep 10 2008, 09:27 AM
Post
#2
|
Group: Members Posts: 7 Joined: 8-September 08 Member No.: 6,618 |
... when float:left; is present =p
|
Christian J |
Sep 10 2008, 11:48 AM
Post
#3
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Floating makes an element shrink to fit its content (unless you give the element an explicit width).
If "width: auto" made its width expand like ordinary block element's I guess it couldn't be used for floating, since there wouldn't be any space for other content to flow around it. |
Lo-Fi Version | Time is now: 24th April 2024 - 03:23 AM |