Hosted sites: 107,622 | Average server uptime last month: 99.9%

Target IE with CSS

You can target IE only with CSS.

This is very useful, as many times Internet Explorer and Firefox display pages differently, and it is much easier to write different code for the browsers than to try to use weird hacks to fix IE bugs.

Add the following code in the <head> section of your page, and create the linked CSS files (ie.css) and upload them.

IE only

 

<!--[if IE]><link rel="stylesheet" href="/ie.css" type="text/css" /><![endif]-->

IE 6 only

 

<!--[if IE 6]> <link rel="stylesheet" href="/ie6.css" type="text/css" /> <![endif]-->

IE 7 only

 

<!--[if IE 7]> <link rel="stylesheet" href="/ie7.css" type="text/css" /> <![endif]-->

Less then IE 7

 

<!--[if lt IE 7]> <link rel="stylesheet" href="/ie6.css" type="text/css" /> <![endif]-->

Greater than IE 6

 

<!--[if gte IE 7]> <link rel="stylesheet" href="/ie7.css" type="text/css" /> <![endif]-->

 

Normal CSS for Firefox

#nav a { padding: 4px; }

CSS in ie.css

#container #nav a { padding: 6px; }

 
findus-fb

Follow Us On Twitter

We accept:

Martfox Hosting

Martfox offers the highest quality web hosting services at the lowest possible prices. We make web hosting simple, so that you can relax and focus on your core business.

Martfox Servers

All of our servers are supplied Supermicro and feature some of the best server-grade hardware. All servers feature 4GB+ of memory and RAID protected storage.

CS-Cart Community

Good news for owners of the CS-Cart trial license! From now on, after registration on the CS-Cart forum you will be able not only to read messages but also to post your own ones.

LiveZilla Live Help