|
-
Mar 2nd, 2001, 02:48 PM
#1
Thread Starter
Fanatic Member
here is my code.
this works in IE and not in NS4.7.
<script language='JavaScript'>
<!--
var ns = (navigator.appName == 'Netscape');
var ie = (navigator.appName == 'Microsoft Internet Explorer');
//var disnavsize='';
var d = window.document;
if(ns) {disnavsize='10'};
if(ie) {disnavsize='9'};
document.write("<style type='text/css'>");
document.write('A.DisNav {color:#666666;font-weight: bold; font-size:' + disnavsize + 'px; text-decoration: none; font-family: Arial, helvetica;}');
document.write('A.DisNav:hover {color:#9ccc99;}');
document.write('</style>');
-->
</script>
<a class=DisNav href="#"><br>testing</a>
the style sheet gets ignored completly in NS
any suggestions?
thanks
-
Mar 2nd, 2001, 03:12 PM
#2
I dont think that verion of netscape supported those CSS elements
-
Mar 2nd, 2001, 03:23 PM
#3
Thread Starter
Fanatic Member
it does
it works if i don't use document.write but I need to change the size of the text depending on what browser the user has.
this works in both IE and NS execpt for the hover property isnt supported in NS
<style>
A.Test
{
BACKGROUND-COLOR: white;
COLOR: #cc6666;
FONT-FAMILY: Arial, 'MS Sans Serif', helvetica;
FONT-SIZE: 12px;
FONT-WEIGHT: bold;
LINE-HEIGHT: 11px;
}
A.Test:hover
{
color:#999999;
}
</style>
<a class=Test href="#"><br>testing</a>
but like I said, i need to use document.write
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|