Shelly wrote:

>[...]
>Can someone verify for me that, if I use a "browser sniffer", it won't 
>completely override the main stylesheet?
>[...]
>  
>
Indeed, ifaik no worry needed. A browser sniffer is just a sniffing 
tool, and doing nothing if it is not asked. Mostly the output is some 
variable, like: "sniffedBrowser".
Code is more or less:

<!-- // javascript
var sniffedBrowser;
if (... lot of things ...) { sniffedBrowser = IE5.5 };
if (... lot of things ...) { sniffedBrowser = IE6 };
if (... lot of things ...) { sniffedBrowser = FF };
if (... lot of things ...) { sniffedBrowser = MisbehavingBrowser1.1 };
if (... lot of things ...) { sniffedBrowser = MisbehavingBrowser3.7 };
// end of sniffing
-->
  

The interesting part (giving the commands what to do with css) is 
totally up to you! - If you add...:

if (sniffedBrowser == MisbehavingBrowser1.1){
      document.write('<link rel="stylesheet" type="text/css" 
href="sheets/misser1.css">')
      };
if (... and so on ...
  

... then you can put everything you want in the special stylesheet for 
that browser.
If the sniffer-script with links to special extra sheets is placed 
*after* the link to the mainstyles.css, only the added or changed styles 
(for that browser) are overruling the main styles, the rest is staying 
as it was. [1]
Just like adding an extra stylesheet as "ie-hacks.css" (also on the end) 
with a cond.comment: doesn't affect things which aren't touched. Cascade 
rules! :-)

Success and greetings,
francky

[1]
Only danger is the other way: if the script is placed before the 
mainstyles.css, the mainstyles can overrule the corrections.



  

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to