For Frak's Sake RSS

For Frak's Sake is a blog by BA Hellman devoted to critiquing the following three topics: Life, Technology, and Business.

Archive

Quotes

Current Business News

News on Technology

Free Dating Online

Find BA Hellman

nobosh

twitter

facebook

email me

Jan
8th
Thu

permalink

My Favorite IE6 Hack

I just had to use one of my favorite IE6 hacks for a project and thought I’d post the IE6 hack I’ve used before on past projects such as nobosh.

If you are having problems with widths in IE6 you’ll quickly learn that normal browsers like FireFox and Safari handle the CSS width property differently than IE6 does. Here the hack:

/* IE6 hack start*/
min-width:800px;
width:auto !important;
width:800px;
/* IE6 hack end*/

What I love about this hack is that IE6 does not recognize the !important CSS attribute. Now that we know IE6 doesn’t recognize the !important attribute you’ll note that IE6 will interpret the width as 800px, as it was the last style assigned. While smarter browsers like FireFox will take notice of the !important attribute and set the width to auto.


Hopefully one of these days we’ll hear Microsoft news that announces Microsoft finally decided to follow the rules and build a browser that is within standards compliance.

This is a very helpful hack - Enjoy!

Comments (View)
blog comments powered by Disqus