Forum Moderators: open

Message Too Old, No Replies

Netscape doesn't center my page and drop-down-menu is not working

         

doenni

10:55 pm on Dec 29, 2004 (gmt 0)

10+ Year Member



Hi guys, I need your help! I've created a webside and everything is shown correctly with IE and Opera but NN is not doing it. My whole page is not centered and my drop-down-menu is also not working. Can someone help me to solve these problems? I've checked the html and the css with the w3validators and everything is fin!

tedster

2:11 am on Dec 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1. What approach are you using to accomplish the centering?

2. Drop-down menus come in MANY varieties, and cross-browser compatibility can be quite tough to achieve, depending on the javascript used (if any) and the way the hidden divs are positioned.

This thread may help reveal some issues for you:

Show-Hide Layers Menu System [webmasterworld.com]

doenni

2:44 am on Dec 30, 2004 (gmt 0)

10+ Year Member



Thanks for your fast response.
I want to center the total page so I tried it first with the <center> tag in the beginning of the body. As I found out that this tag is depricated I used <div align="center"> instead but both versions didn't work in NN (In IE it works).
I'm using a very small java-script for the menu it works just with the attribute: visible, hidden, here it is.

function showmenu(elmnt)
{document.all(elmnt).style.visibility="visible"}

function hidemenu(elmnt)
{document.all(elmnt).style.visibility="hidden"}

doenni

9:25 pm on Dec 30, 2004 (gmt 0)

10+ Year Member



Thanks a lot! It looks better in NN now but all the tables are still not centered!

tedster

6:20 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One of the issues here is that text-align:center is purposed to align TEXT, and not to position a block-level element like <div> or <table>. So, with a strict DTD or in a standards-compliant browser, this approach will likely fail if it's the only code that tries to center the element.

I'd suggest working with <table style="margin:0 auto;"> IE gets cranky when margin:auto is your only centering method. But that CSS is standards-based and other browsers respond very nicely, as IE also 'should'. IE will respond to txt-align:center but it will also inherit to child elements unless you also use text-align:left in those.

The key thing to discriminate here is that centering an inline element, such as text, is a different thing from centering a block-level element.