Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top Navagation Bar wandering. 1

Status
Not open for further replies.

jstreich

Programmer
Apr 20, 2002
1,067
US
I have a page, that at last check was xHTML strict (and the CSS validates as well), and shows properly in FF and Opera. I know that IE6 is missing the drop downs, and has PNG issues, but those are small fixes. The issue I can't understand is in IE (even in 7) the menu bad is not where is should be. Any idea on the cause of the odd placement?




[plug=shameless]
[/plug]
 
It is because your menu is absolutely positioned and has no set position. FF (and most other browsers) assume the absolute position from the top left corner of the parent container. However, IE calculates it from the point where the text pointer of the container would be. And since the container has [tt]text-align: center;[/tt] it aligns the top left edge of the menu to the center of the container.

I would work around using the absolute positioning, but if you want a quick fix, simply remove the text-align from the container or better yet, change it to left.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
The absolute is needed to take the dropdowns out of the flow of the page (read: to keep everything else from jumping arround as the menu expand). For the time being I'll use your "quick fix", but if you have any suggestions on another way to keep the nav bar from disrupting the page when the menu drop down, I'm quite open to them. Star for you.

[plug=shameless]
[/plug]
 
I would think only the actual dropdowns would be absolutely positioned, not the menu itself (because the menu should be normally positioned where it is. But unfortunately I do not have enough time to check that myself right now.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top