tags:

views:

87

answers:

2

With the following CSS, anchor links end up being hidden by the navigation bar.

What solution would you proposed to have the anchor link text being shown just under it?

/* style and size the navigation bar */
table.navigation#top
{
  position: fixed;
  margin-top: 0;
  margin-bottom: 0;
  top: 0;
  left: 0;
  z-index: 10;
}

thanks

A: 

Put your navigation bar inside of a container that has padding-top that matches the height of your navigation bar.

You should also be able to position: relative your links give them a top that matches the height of your navigation bar.

Bryan Downing
thanks, what if I don't know the height?
elmarco
I would use javascript to get the height of the navigation bar and set that value as the `padding-top` of the containing element.
Bryan Downing
A: 

Everything is Ok, but this look weird in IE6. Is there any fix for that? Thank you.

Alex