style not working in IE

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
This sample works in Firefox, but not in IE 6.x.  I can't figure out the
Any input would be appreciated.  On the hover, I expect the text to turn red
and the weight to turn bold.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


      <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">

<style type="text/css">

.labelcell {
 color : Black;
 background-color : #e2f1b6;
 font-family : Verdana, Arial, Helvetica, Sans-serif;
 font-size : 10px;
 font-weight : normal;
 line-height : 15px;
 text-align : center;
 border-right: #afc863 1px solid;
 padding-right: 2px;
 border-top: #74a403 1px solid;
 padding-top: 2px;
 border-left: #afc863 1px solid;
 padding-left: 2px;
 border-bottom: #74a403 1px solid;
 padding-bottom: 2px;

.linkcell a:visited {
 FONT-WEIGHT: normal; COLOR: #000000; TEXT-DECORATION: none

.linkcell a:hover {
 FONT-WEIGHT: bold; COLOR: #FF0000; TEXT-DECORATION: underline


  <table border="0" cellspacing="2" cellpadding="0" width="780"
    <td class="labelcell">
     <span class="linkcell"><a

    <td colspan="4" class="list_link_filler">&nbsp;</td>


Re: style not working in IE

With neither quill nor qualm, WJ quothed:

Quoted text here. Click to load it

IE does hover only on links so put a class on them.

Contrary to popular belief, it is believable.

Re: style not working in IE

Quoted text here. Click to load it

Try this

<span class="linkcell"><a href="#"
    onclick="getDetail(1); return false;" >View</a></span>

IE only supports :hover on links, and "link" means an <a> with a href
attribute, not just a <a>.  

The href added here is a dummy and because the onclick event returns
false it won't be activated, even if clicked.

You don't need the "javascript:" pseudo-protocol, because this is an
even handler attribute, not a url.

I advise against using bold in a hover CSS rule, because it makes the
link text wider and causes the text to re-flow. It's often a jerky page,

 Cats have nine lives, which is why they rarely post to Usenet.

Re: style not working in IE

Awesome, thanks!

I was using the bold to just see if obviously change.
The style I want is text-decoration:underline and
curser:pointer on the hover.

I was trying to avoid the href="#" because this is
in a search result page, which can sometimes be
longer than the browser window.

When I click on that after scrolling, the page "jumps"
to the top just before executing the javascript.

It works fine, just a little annoying to look at.  Do you
know a way to implement this and prevent that "page jump"?

Re: style not working in IE

Quoted text here. Click to load it

I told you already - return false from the onclick handler. That stops
further processing of the click event, including using the href for

Re: style not working in IE

Quoted text here. Click to load it

Got it!  Sorry, that took two readings.  :-)  Thanks for your help!

Site Timeline