Setting
margin for NN4

Giganews Newsgroups
Subject: Setting <div> margin for NN4
Posted by:  Ian Rastall (idrasta…@earthlink.net)
Date: Thu, 03 Jul 2003

This really is a JavaScript question. I have a site that looks fine in
everything but NN4. I'm afraid I don't have a URL, because the site is
very much unfinished.

The site is a header (which is a table) and a main <div> underneath
that. The main <div> is set to have a top margin of 3%, which works
fine, except in NN4. There, it looks like it has a margin of 20%, or
even larger.

I couldn't fix it with the @import hack, so I thought I might try
JavaScript. I tried something like this:

<script language="JavaScript" type="text/javascript">
if (document.layers) frank.styles.margin-top = "-20%"
</script>

(I called the <div> "frank" ...)

I'm very sorry, because I'm almost certain this isn't real JavaScript.
I'm just shooting in the dark. Is this *going* in the right direction,
or is this approach completely flawed? Would NN4 even understand
something like this?

TIA

Ian

--
http://www.aspipes.org/
http://www.bookstacks.org/

Replies