CSS with SSI

design

#1

To take care of some MSIE/Firefox/Opera differences I use CSS with SSI, that is header section of html document contains the following tag:

while style.htm contains the following lines:

< !–#if expr="${HTTP_USER_AGENT} = /Firefox/" -->
< !–#include virtual="/style-ff.css">
< !–#elif expr="${HTTP_USER_AGENT} = /Opera/"–>
< !–#include virtual="/style-op.css">
< !–#else -->
< !–#include virtual="/style-mscss">
< !–#endif -->

(space inserted before “!” to make the tags visible in this forum)

This works fine with my other hosting provider, but not with DreamHost. Why?


#2

This is a terrible way to feed different CSS to different user agents. First of all, Opera identifies as Internet Explorer by default, yet its CSS support is more similar to that of Firefox and Safari. Instead, I would recommend using conditional comments to feed IE different rules.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL