Jump to content

Ie Ignoring Relatively Positioned Anchor


pealo86

Recommended Posts

I am positioning an anchor like so:

 

#test-link { position: relative; bottom: 100px }

 

As I need it so that when I visit #test-link the page jumps down to that particular section, but 100px higher. Otherwise the page scrolls too far down for what I need.

 

This works fine in decent browsers, however in IE7, 8 and 9 the relative positioning gets completely ignored.

 

I've tried different ways to fix it such as adding text to the anchor as well as various CSS properties (e.g. display: block) however nothing makes any difference.

 

Does anyone have any ideas?

Hey

 

I remember asking the same question before.

 

There was something that the top takes priority if there is a bottom tag.

 

So you will need something like this

 

#test-link
{ top: auto; position: relative; bottom: 100px; }

 

this seems to be a problem for ie only

 

hope this helps

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.