Quick Tip 8 – Alternate Style Sheets

As a web designer you are always trying to push the boundaries of design and what the browser can do. Sometimes the work you produce will not work in all browsers (Internet Explorer) but you don’t want to have to comprise on the other browsers that display your design how it was mean’t. So what can you do?
Quick Tip Gary
Well, because of a few issues in IE there is the ability to set your document to retrieve certain styles dependent on the browser. Here are the style sheet links below.

IE 5.5 Alternate Style Sheet

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

IE 6 Alternate Style Sheet

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

IE 7 Alternate Style Sheet

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

IE 8 Alternate Style Sheet

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

All IE Alternate Style Sheet

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

Print Style Sheet

Here is an also very handy print style sheet.

<link type="text/css" media="print" rel="stylesheet" href="/print.css" />

Handheld Devices

Suitable for mobiles and other handheld devices.
<link type="text/css" rel="stylesheet" href="handheldstyle.css" media="handheld" />

Related posts:

  1. Quick Tip 5 – Compact CSS
  2. Quick Tip 6 – CSS Shorthand
  3. Quick Tip 7 – CSS !Important
  4. Quick Tip 9 – CSS min height
  5. Quick Tip 2 – CSS Text Shadow

Tags: , ,

Leave a Reply

Contact Us Today...

For more information regarding any of our services or to arrange a free consultation simply send us a message or call 02920 290 080 for Cardiff and 01179 000 482 for Bristol.

Firefox 4 Beta

Mozilla have released the first beta version of Firefox 4. The latest version of this browser will include better support for many of the new web technologies, a new add on manager, crash protection from third party plugins and accelerated hardware support. One of the most obvious changes is that the tabs have now been moved [...]
» more

Cardiff: 02920 290 080 Bristol: 01179 000 482