Solved

Anchor is not clickable, but only in Firefox

Posted on 2006-11-08
3
1,002 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
My code mulfunction, can anyone help me on how to fix it? 1 60
CSS Question 9 42
Capture logon name 11 31
css img-response wont work properly 7 16
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now