www.webdeveloper.com
Results 1 to 5 of 5

Thread: Link doesn't work with class in IE 5.01

  1. #1
    Join Date
    Apr 2005
    Posts
    5

    Link doesn't work with class in IE 5.01

    The rollover works fine, but the link doesn't work in IE 5.01 (IE5.5 works fine, as do all current browsers). If I remove the class from the paragraph, then it works. How do I make it do both - rollover and link?

    <p class="rollover"><a href="gmprog.shtml">
    <img src="../picts/btn-gmprog-ro.gif" width="201" height="30" border="0"> </a></p>

    Internal Style Sheet:
    .rollover a { display:block; width: 200px; height: 30px;}
    .rollover a:hover {background-color: #CECEDA; }

    Here's the referenced page in case I've left something important out of my explanation (I'm still learning :-). It's the button in the middle of the page.

    http://www.aztcs.org/activities/gminfomap.shtml

    Thanks
    Jayell

  2. #2
    Join Date
    Mar 2005
    Location
    Washington, USA
    Posts
    379
    Hmm. I'd think you'd want the <p> tag to not have a class on it, but make the <a> like this: <a href="gmprog.shtml" class="rollover">link text or image</a>. If you put a.rollover in the stylesheet, the style will only work with <a>'s, not <p>'s. Hope this helps!
    Jason Granger's Blog

    I'm an inactive member...

  3. #3
    Join Date
    Apr 2005
    Posts
    5
    Yes, that's what I thought, but still doesn't work. I either get the rollover .. or the link .. but not both.

    Someone in another group mentioned that the first line of my style sheet:
    .rollover a { display:block; width: 200px; height: 30px;}
    serves no purpose. That seemed to resolve the issue.

    Thanks
    Jayell

  4. #4
    Join Date
    Mar 2005
    Location
    Washington, USA
    Posts
    379
    Try changing ".rollover a" to "a.rollover". I doubt it will help, but it's worth a try! Heh
    Jason Granger's Blog

    I'm an inactive member...

  5. #5
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    It's working as is in FF but your HTML has lots of problems.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles