Solved

Anchor is not clickable, but only in Firefox

Posted on 2006-11-08
3
1,005 Views
Last Modified: 2008-03-04
Hi, I've never experienced this before, and I'm hoping someone can help me.

I have a few nested divs, and on the inner one, where the text is, I've assigned a style to the anchor tag and hover condition... well, it works perfectly in IE and is ignored, and in fact my anchor because not clickable at all, in Firefox!?

If someone can help, I'd be most obliged.  I am sure this must have something to do with the CSS because it only became a problem when I added the styling.  I've moved the definition around between #stretch and #stretchtext to no avail.

CSS code is:

#stretch {
      position: absolute;
      top: 83px;
      left: 0px;
      height: auto;
      overflow: hidden;
      width: 780px;
}

#stretchbg {
      top: 83px;
      margin: 0px auto;
      background-image: URL('images/sub_bg.gif');
      background-repeat: repeat-y;
}

#stretchtext {
      margin-left: 20px;
      margin-right: 20px;
      height: auto;
      border: 1px dotted white;
}

#stretch a, a:visited, a:link {
      text-decoration: none;
}

#stretch a:hover {
      text-decoration: underline;
      color: #2C70B1;
}


webpage code is:

<div id="content">
      <div id="banner"></div>
      <div id="stretch">
            <div id="stretchbg">
                  <div id="stretchtext"><a href="AustinTestimonial.php"><img src="contentimages/Austin.gif" border="0" width="204" height="58" alt=""> Austin Hospital</a>
                        <p><a href="MonashTestimonial.php"><img src="contentimages/Monash.gif" border="0" width="143" height="33" alt=""> Monash Medical Centre</a></p>
                        <p>&nbsp;</p>
                  </div>
            </div>
            <div id="footer"></div>
      </div>
      
</div>

Thanks heaps!
0
Comment
Question by:hmaloney
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
JohnModig earned 125 total points
ID: 17904872
I've experienced a similar problem before - then the problem was overlapping div's. Make sure no div is on top of (or overlapping) the div containing the anchor. Even though the top div might be empty or transparent - if it is on top of the anchor, then the anchor won't be clickable in Firefox, but will work in IE.

How to look for the problem:
Try assigning a background-color and border to ALL your divs, just to check the layout. Whenever you are sure everything is ok, simply remove the background-color and border. Since I dont have all your CSS its hard for me to locate if this is the problem. It might be the footer div?

John
0
 
LVL 11

Assisted Solution

by:JohnModig
JohnModig earned 125 total points
ID: 17904882
...or the banner div?

Also, another solution to the same problem is that you can try to set the z-index on the div containing the anchor to a value higher than the surrounding divs, like so:

#stretchtext {
     z-index: 10;
}
0
 

Author Comment

by:hmaloney
ID: 17910314
Thanks for both your help.

It's started working again now.  :-S  but at least I know where to look next time it happens.

Cheers,
Heather
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question