Jump to content

Browser Detection and Styling

- - - - -

  • Please log in to reply
No replies to this topic

#1
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
Ok, I'm trying to style a element IF the user is using Internet explorer in the shortest amount of code possible. This looks right but it's not working, maybe some1 can spot my error?

<script type="text/javascript">

<!--

var element=document.getElementById("monthlyPara");

if (navigator.appName=="Microsoft Internet Explorer")

{ 

          element.style.color="blue";

}

-->

</script>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users