The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> width:auto; not working in IE
deadrabit
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
deadrabit
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 10 2008, 11:48 AM
Post #3


.
********

Group: WDG Moderators
Posts: 8,501
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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 6th August 2020 - 11:34 PM