473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Hyperlink clickable area is incorrect in FF 2.0.0.9

Hello, on my website at http://www.breakupemail.com/ there is a horizontal navigation bar with 6 hyperlinks. Recently, I added a second navigation row below the first, with 2 links. Once this second navigation bar was added, the clickable area on the 6 links in the top row became greatly reduced when viewed in Firefox 2.0.0.9. It seems to work properly in IE 7.

Essentially, if you hold your mouse over the center of the text link, it will not act as a hyperlink - you need to position the mouse over the bottom part of the text.

The html code for the links section is:

Expand|Select|Wrap|Line Numbers
  1.     <div id="linkbar">
  2.         <div id="navcontainer">
  3.             <ul id="navlist">
  4.                 <li id="active"><a href="index.php" id="current">Home</a></li>
  5.                 <li><a href="dump.php">Break up with him/her</a></li>
  6.                 <li><a href="faq.php">FAQ</a></li>
  7.                 <li><a href="contact.php">Contact</a></li>
  8.                 <li><a href="links.php">Links</a></li>
  9.                 <li><a href="http://digg.com/submit?phase=2&url=http://breakupemail.com&title=BreakUpEmail&
  10. bodytext=Breaking%20up%20is%20easier%20than%20ever&topic=programming">Digg It!</a></li>
  11.             </ul>
  12.         </div>
  13.         <div id="lowerlinkbar">
  14.             <div id="lowernavcontainer">
  15.                 <ul id="navlist">
  16.                     <li id="active"><a href="http://breakupemail.com/" id="current">BreakUpEmail.com</a></li>
  17.                     <li><a href="http://quitmyjobemail.com/">QuitMyJobEmail.com</a></li>
  18.                 </ul>
  19.             </div>
  20.         </div>
  21.     </div>
The CSS that applies to this section is:
Expand|Select|Wrap|Line Numbers
  1. #linkbar {
  2.     background-image: url(images/linkbar_bg.jpg);
  3.     background-repeat: repeat-x;
  4.     height: 59px;
  5. }
  6.  
  7. /******************** Top Main Navigation ************************/
  8.  
  9. #navcontainer ul
  10. {
  11.     background-color: #46d0fd;
  12.     float: left;
  13.     width: 100%;
  14.     font-family: arial, helvetica, sans-serif;
  15.     background-image: url(images/linkbar_bg.jpg);
  16.     background-repeat: repeat-x;
  17.     height: 59px;
  18. }
  19.  
  20. #navcontainer ul li {
  21.     display: inline;
  22. }
  23.  
  24. #navcontainer ul li a {
  25.     padding: 21px 20px 0px 20px;
  26.     color: #fff;
  27.     text-decoration: none;
  28.     float: left;
  29. }
  30.  
  31. #navcontainer ul li a:hover {
  32.     background-image: url(images/hover_link_bg.jpg);
  33.     background-repeat: repeat-x;
  34.     height: 35px;
  35.     color: #FFFFFF;
  36. }
  37.  
  38. /********************* End top navigation ***************************/
  39.  
  40. #lowerlinkbar {
  41.     height: 30px;
  42.     position: relative;
  43.     margin: 0 250px 0 0;
  44. }
  45.  
  46. /******************** Lower Linkbar Navigation ************************/
  47.  
  48. #lowernavcontainer ul
  49. {
  50.     float: right;
  51.     width: 100%;
  52.     font-family: arial, helvetica, sans-serif;
  53.     height: 22px;
  54.     margin: 6px 0 0 20px;
  55. }
  56.  
  57. #lowernavcontainer ul li {
  58.     display: inline;
  59. }
  60.  
  61. #lowernavcontainer ul li a {
  62.     padding: 8px 20px 0px 20px;
  63.     color: #03687e;
  64.     text-decoration: none;
  65.     float: right;
  66. }
  67.  
  68. #lowernavcontainer ul li a:hover {
  69.     background-image: url(images/lowerhover_link_bg.jpg);
  70.     background-repeat: repeat-x;
  71.     height: 30px;
  72.     color: #73b7e6;
  73. }
  74.  
  75. /******************** End Lower Linkbar Navigation ************************/
Can anyone spot the mistake I've made and offer some suggestion as to how I might correct it? Any help will be greatly appreciated!
Jan 14 '08 #1
3 2165
drhowarddrfine
7,435 Expert 4TB
First, you have at least 17 html errors on your page including the use of multiple 'id' names. ids can only be unique to one element on a page. These need fixing.
Jan 14 '08 #2
garrow
32
First thing
I think you use too many divs, too many IDs when you should be using classes.
Remember, an ID is for a single element on a page, and classes are for multiple elements.

There is no height set on the main nav anchors. except on hover.
Add
Expand|Select|Wrap|Line Numbers
  1. #navcontainer ul li a {
  2.     height: 35px; 
  3. }
Also remove the following height declaration, its adding 30pxs of unclickable element above your main nav.

Expand|Select|Wrap|Line Numbers
  1. #lowerlinkbar {
  2.     height: 30px; 
  3.     position: relative;
  4.     margin: 0 250px 0 0;
  5. }
Too see all this in action, try adding a 1px solid red border to elements that dont appear to be working. you'll quickly see why.

Also use firefox, with WebDeveloper Toolbar or Firebug plugins.
Your sanity will thank you.

And stop using so many empty divs.
Jan 14 '08 #3
Sorry for the coding errors and extra divs, I've got a bit of learning to do but thanks to both of you for pointing that out and especially for the solution to the problem with the height attributes! Now the links work perfectly!

Thanks a million!
Jan 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Randell D. | last post by:
Folks, I am working on a contact db using PHP and MySQL. My results so far outputs a slimed down version of records to the browser. I would like to implement a method whereby the user can...
53
by: Kerberos | last post by:
I followed Dan Cederholm's image replacement tutorial, to replace a header tag by a logo. The h1 is clickable if no CSS is applied but it I replace it by the logo, the area isn't clickable anymore...
9
by: Lando Chez | last post by:
Hi I need a map of a country on which a region( part of the map) can be clicked ( or on mouseover) causing, on another part of the same page, the appearance of information regarding the region....
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
1
by: Newbie | last post by:
Hello I need some help to make a hyperlink in a XML file. My XML file: <?xml version="1.0" encoding="ISO-8859-1"?> <TERAPEUTLISTE> <TERAPEUT> <NAVN>Et navn</NAVN> <ADRESSEN>En...
1
by: SAL | last post by:
Has anyone worked with the System.Web.UI.WebControls.HyperLink? I am trying to find examples on how to use it. What I am trying to do is assign a Hyperlink to a document (i.e. .doc, .pdf,...
15
by: Jeff | last post by:
Hey gang. i have this Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") & vbCrLf coming from access db. how can i get that to make a hyperlink clickable as well??
4
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a GridView that is displaying master records. Some of these records have child records. I would like to a column to my master GridView such that for each master record that has...
3
by: crazychrisy54 | last post by:
Hi there I just wondered if there is any way using GD to insert a clickable button or some clickable text into a image? It is possible to create images for buttons but what if you want a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.