Welcome to WebmasterWorld Guest from 54.161.110.186

Forum Moderators: ergophobe

Message Too Old, No Replies

Skiplink not working properly

FF good. IE bad.

     
8:34 am on Jul 31, 2006 (gmt 0)

5+ Year Member



I have an offline page in my local sandbox, which has two skip links at the very top of the page. If I click on one of them - 'skip to navigation' - Firefox obediently jumps to a navigational area near the bottom of the page, and if you go through all the links you get to a 'top of page' skip link which works fine.

In IE, you initially go to the navigational area as expected. But as soon as you hit TAB to scroll through the list of links, the page takes you back up to the 'Content' area.

I can't think why this happens. I did have some conditional comments for IE at the end of the <head> section. But it makes no difference if I take them out. (I have known conditional comments to cause occasional problems before.)

The two skiplinks are made up of a short unordered list. I have tried them in and out of a <div> but to no avail.

Any ideas? (I'll see if I can rustle up some code later unless anyone has a brainwave in the meantime.)

10:17 am on Jul 31, 2006 (gmt 0)

5+ Year Member



Well, looks like I've beaten you all to the solution on this occasion. (Although maybe it is less to do with my lightning-fast brain, than the fact that some of you are in the USA, which is at least five hours behind the UK. Basically, I just got up a bit earlier!)

The answer was as follows:

My '#navigation' anchor was just outside of a table. The links that I mentioned earlier were INside the table. So, when I moved the anchor inside the top of the table as well, everything worked fine. Three further questions follow on from this:

1. Why was I putting unordered lists of links in table-cells to begin with? (Well, it was just a fast way of lining stuff up precisely, without one list disappearing under another. The finished product might use a different method entirely.)

2. Which browser was actually doing things correctly; Firefox, or the much-maligned IE? (I have no idea, but that might get you thinking if you are well acquainted with all the tech spec.)

3. What about Opera? (Dang! Forgot all about Opera. Hang on...No, Opera doesn't play ball either way round. It doesn't jump to navigation, but goes halfway down the main content area instead. Hell, I can live with that;-))

 

Featured Threads

Hot Threads This Week

Hot Threads This Month