|
-
Jun 9th, 2005, 10:58 AM
#1
Thread Starter
Evil Genius
Javascript & CSS
Hi people!
I'd like my site's menu hyperlinks to be bold & be a taller size when the mouse rolls over them. I'd like this effect to happen whether the user's browser supports CSS, JS or both.
How could I check through Javascript whether the browser supports CSS please? If the user's browser does support CSS, the Javascript won't need to run as well. I've tried to following, but without success:
Code:
if (document.styleSheets == null) {
document.getElementById(hlnkToAlter).style.fontWeight = 'bold';
document.getElementById(hlnkToAlter).style.fontSize = '14px';
}
if (document.styleSheets [0].disabled == false) {
document.getElementById(hlnkToAlter).style.fontWeight = 'bold';
document.getElementById(hlnkToAlter).style.fontSize = '14px';
}
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
|