Lancom Posted January 3, 2010 Report Share Posted January 3, 2010 help ar js katram brauzerim savs stills. kr4 man problema ir tada IE parada ka fons ir melns bet kur firefox.css neperada #EEEEEE fonu! es js 20 % tikai zinu! <script type="text/javascript"> DOM = document.getElementById; Netscape4 = document.layer; Netscape6 = Mozilla = (navigator.appName == "Netscape") && DOM; Netscape7 = navigator.userAgent.indexOf("Netscape/7") >= 0; Opera5 = window.opera && DOM; Opera6 = Opera5 && window.print; Opera7 = Opera5 && navigator.userAgent.indexOf("Opera 7") >= 0; Opera8 = navigator.userAgent.indexOf("Opera/8") >= 0; Opera9 = navigator.userAgent.indexOf("Opera/9") >= 0; IE = document.all && !Opera5; Firefox = navigator.userAgent.indexOf("Firefox") >= 0; if(IE) document.write("<link rel='stylesheet' href='ie.css' type='text/css'>"); else document.write("<link rel='stylesheet' href='Firefox.css' type='text/css'>"); </script> Quote Link to comment Share on other sites More sharing options...
0 mefisto Posted January 3, 2010 Report Share Posted January 3, 2010 Un tieši kapēc tu nevari lietot conditional comments ? http://haslayout.net/condcom Quote Link to comment Share on other sites More sharing options...
0 Lancom Posted January 3, 2010 Author Report Share Posted January 3, 2010 var Topic close es so realizeju so funkciju caur php scriptu! Quote Link to comment Share on other sites More sharing options...
Question
Lancom
help ar js katram brauzerim savs stills. kr4 man problema ir tada IE parada ka fons ir melns bet kur firefox.css neperada #EEEEEE fonu!
es js 20 % tikai zinu!
<script type="text/javascript">
DOM = document.getElementById;
Netscape4 = document.layer;
Netscape6 = Mozilla = (navigator.appName == "Netscape") && DOM;
Netscape7 = navigator.userAgent.indexOf("Netscape/7") >= 0;
Opera5 = window.opera && DOM;
Opera6 = Opera5 && window.print;
Opera7 = Opera5 && navigator.userAgent.indexOf("Opera 7") >= 0;
Opera8 = navigator.userAgent.indexOf("Opera/8") >= 0;
Opera9 = navigator.userAgent.indexOf("Opera/9") >= 0;
IE = document.all && !Opera5;
Firefox = navigator.userAgent.indexOf("Firefox") >= 0;
if(IE) document.write("<link rel='stylesheet' href='ie.css' type='text/css'>");
else document.write("<link rel='stylesheet' href='Firefox.css' type='text/css'>");
</script>
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.