Recently I have been doing some changes to the CSS files on this site. I wanted to eliminate the page width of the default template of plog, now the site uses the browser window width.
While developing the changes, I tested with Mozilla (and derivatives) and Konqueror, everything worked perfectly, until I restarted my computer in order to do the required Internet Explorer test, as I expected it does not looked right.
I investigated for a nice workaround to the IE bugs that does not need client or server side browser sniffing, and found this feature of IE called Conditional Comments
This feature is activated when the page uses standard HTML/XML comments with an special format, when IE detects them they will be shown according to the IE version that is being used or ignored.
The following example includes a CSS file only if the browser is IE 6 or superior:
<!--[if gte IE 6]> <link rel="stylesheet" href="/plog/styles/marcanoonline-ie.css" type="text/css"/> <![endif]-->
Any other browser (many of them with better CSS support than IE) will ignore the comment and the stylesheet will not be loaded










Trackbacks (0)