Subscribe to the MPC blog rss feed feed-icon-14x14
 

Handling IE Differently



Posted on 01:27PM on 08/31/2008
Tags: browser, blog

I noticed when viewing this site in IE 7 that the tabs at the top of the page were not properly aligned. They look good in Firefox (on Ubuntu) and Konqueror, but not IE 7. Big suprise, right? Anyway, the easiest thing to do is create a stylesheet specifically for IE that overrides the existing styles and is only loaded when the requesting browser is IE. The conditional code can be placed in the header section of the layout file. For example:

  
   

This seems simplest. If the browser is IE, the additional stylesheet will be loaded and the styles will be properly overriden. Is there an easier way to accomplish this?

0 Comments (Show) (Comments are closed for this post)

 
Please note that I am currently unavailable for any large, long term work.