Jump to content

Recommended Posts


Posted

If the item will be a link, <a>, then you could use :hover in CSS like so:

<style>
a {
background: blue;
}
a:hover {
background: white;
}
</style>

You could use :hover with other tags, but it won't work in IE, it only recognizes a:hover..

The more compatible method would be javascript + CSS (DHTML I think its called), like so:

<style>
span {
background: blue;
}
.whitespan {
background: white;
}
</style>
</head>
<body>
<span onmouseover="this.className='whitespan'" onmouseout="this.className=''">Text..</span>

Hope this makes sense and helps.. :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...