Technews, the way I like it...


New IE7 Broke CSS Width.

, posted: 9-Nov-2006 07:38

This is rather interesting, while some web developers have welcomed IE7 with most of its effort stepping up its CSS 2.1 supports, however it did so along the way by breaking CSS's width property.

How so you asked? Well if you have IE7 and know a bit of HTML/CSS, try this:

With any HTML element, or just try DIV, then apply "width:100%;" as its CSS style and see the result.

What happened is that, when width:100%; is present, IE7 will "shrink" the box size down to its content size. Not exactly 100% wide is it?

How to fix it? Well, simplest is use width:auto; (depending on your design too, however it is safe for majority of the design/usage).

If you found yourself that you need width:100% (for example when using with float:left/right together with width:100% on Opera*, you can always use the "highly recommended" conditional comment which fortunately only IE will recognise.





Tag(s):       


Other related posts:
Telecom XT Pricing Plans Announced
Vista virtualisation ban lifted
64-bit Windows support in Boot Camp


 

Permalink to New IE7 Broke CSS Width. | Add a comment (2 comments) | Main Index




Comment by Kory Hoopes, on 10-Nov-2006 17:53 , user id: )

Why can't they just get it right? Must they have something wrong to prove they don't have to bend to the established standards? IE7 is better than IE6, but I'll stick with my Firefox.


Comment by Scott Cleland, on 24-Nov-2011 09:30 , user id: )

I had this problem on a site I was working on where the client wasnt able to upgrade from IE7. I had to set "left:0;" in order for it to work.


Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.

Your name:

Your e-mail:

Your webpage:

Blog Category

Announcement...
Annoyance...
Blog Update...
Films...
Free Hugs...
Gadget...
Games...
News Tidbits...
Personal...
Praise...
Rant...
Technology...
Thought...
Travel...
Tune...
Website...


Recent Posts

Your joke wasn't funny!...
End of first half of 2010!...
Telecom XT Pricing Plans Annou...
Critical MS Windows Patch - MS...
Diablo III is coming!...
Nintendo in NZ is in jeopardy ...
NZHerald tech writer needs to ...
Underperforming XBLA games to ...
Apple new MacBook and MacBook ...
[Update] Logitech Harmony 880 ...


Latest Geekzone Posts

Megaupload and the US grand ju...
(juha, 31-Jan-2012 14:29)
Did Twitter really take in con...
(freitasm, 30-Jan-2012 12:28)
Part 1 - Planning...
(hazza87, 28-Jan-2012 13:27)
Is this really the Teapot Tape...
(juha, 26-Jan-2012 13:54)
Eclipse on Windows 7 for Devel...
(robscovell, 25-Jan-2012 08:13)
Customise your Visual Studio 2...
(VisualStudio, 24-Jan-2012 10:12)
The unlikely winner of CES 201...
(paulspain, 23-Jan-2012 16:12)
Filesonic disables file sharin...
(juha, 23-Jan-2012 14:33)
What you need to know about el...
(MrWestie, 22-Jan-2012 19:33)
Reasons to be cheerful in Wark...
(juha, 22-Jan-2012 18:15)


Top 10 Posts

WM5 device as USB Wireless Mod...
(28-Dec-2006 11:34, 81050 views)
Nintendo GameCube games on Wii...
(15-Jan-2007 08:50, 80560 views)
SD Card Reader on Windows Vist...
(25-Sep-2006 08:32, 76390 views)
FREE 14-days World of Warcraft...
(7-Oct-2006 17:17, 71292 views)
Harvey Norman & HP Custo...
(28-Jul-2006 10:36, 33274 views)
SD vs miniSD vs microSD...
(10-Oct-2006 17:13, 33208 views)
[Update] PS3 40GB Backward Com...
(9-Oct-2007 11:24, 31113 views)
[Update] Got Vista? Got VMC? B...
(12-Oct-2007 10:00, 25978 views)
Xbox 360 vs Nintendo Wii vs So...
(7-Aug-2006 19:39, 22956 views)
Pay more, wait longer, and get...
(26-Feb-2007 10:05, 18374 views)


About Me...