Hiding styles from Internet Explorer for the Mac

Of all the browser bugs, security holes and rendering issues ever discovered on the net, without a doubt the worst is Internet Explorer for Mac. Microsoft really outdid themselves that time. Thankfully the browser was discontinued some time ago, but none the less, there still exists users that prefer it.

The problem mostly lies in its horrid support for web standards like CSS. I use CSS exclusively to handle the presentation portions of web pages (the layout and pretty things). It works great. Its the recommended best practice. Not in IE Mac.

IE Mac butchers CSS layouts so badly, and now has so few users that I feel its time, to drop IE Mac support completely. This means that IE Mac users will have a plain, boring page instead of a broken layout. I feel this is better since the IE Mac users will still have full access to the content of the page.

How is this done? It's actually quite simple. Either in your HTML/XHTML or CSS file, simply do something like this:


/* hide all styles from ie/mac */
@import url("stylesheet.css");
/* end hide */

Here's how it works: " /* " denotes an opening mark for a comment that is not parsed (read) by the browser. " */ " represents the end of the comment. IE Mac has a little parsing bug. If you add in a back slash " \ " before the end of your comment, IE Mac will treat everything following that back slash as a comment until it reaches another " */ ".

This allows you to place any styles you want it to ignore safely inside. All other browsers will read the stylesheets just fine.

Bookmark this post:
Stumble Digg Technorati Reddit Delicious

Keep it Clean, Simple & Elegant

The web is confusing enough already.
Designing thoughtful websites that deliver information quickly and easily while providing a pleasant web experience to all visitors. That's the Sites by Joe way.

View the Website Portfolio

The proof IS in the pudding. Beautiful, hand-crafted websites that are lovingly created from scratch. See for yourself some of the custom websites that I've designed and developed for my clients in Southern New Jersey and many points around the globe. View the website portfolio.

Want to work with Sites by Joe?

I'm passionate about the web. I love creating websites and it shows in the results. I'd enjoy hearing about your project and discussing ways we can bring your ideas to fruition.

This dedication to service and results brings many new referrals and inquiries. At the same time I try to only focus on a couple projects at a time. That said, it would be wise to get in touch ahead of time to start the dialog for your new website. Work with me