PDA

View Full Version : Anylink Dropdown adding unwanted margin on page top



neod
10-01-2005, 08:49 PM
The script is adding unwanted gap on page top, preventing a div on the top to be placed on page top without any margin. I believe this problem is because of this line:
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')Why is this line there outside of a function, can it be placed inside a function so this div is not loaded by default. I know this is weird problem (it doesn't occur at a different page on my site, or at the DD sample). But I have taken out every piece of code from the page and tested it, and the addition of this script is the one causing the that extra unwanted margin.

P.S. The problem only occurs in IE. Page loads fine in firefox.

HtmlWiz
10-03-2005, 12:48 AM
try doing somthing like a locked command or somthing like that much like you would in a table

jscheuer1
10-03-2005, 05:39 AM
You could try changing all occurrences of:

visibility

to:

display

all uses of:

hidden

to:

none

all of:

visible

to:

block

In all code and markup of the script. That will keep that division out of the flow of the document, except when it is being used. If that doesn't work:

.