Jump to content

DHTML and IE


larryd

Recommended Posts

Why does this not work in IE yet it works fine in Mozilla?

<html><head></head><body><h1>This is a Heading</h1><div style="position:fixed; left:300px; top:300px">this is fixed text</div><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><table><tr><td>TEXT HERE</td></tr></table></body></html>

Link to comment
Share on other sites

Add a valid Doc Type Declaration?And Positioning in IE is peculiar sometimes. Try adding margin-top and margin-left instead of the style you have there.And where is the DHTML?

Link to comment
Share on other sites

I'm a tard. I was messing with layers in DHMTL and thats what prompted my title. So the code above was just an example of what I'm really trying to do. I am working on a page for my boss that is quite tall. He has a google ad on the top right that is 160x600. I'd like to make the google ad static so that when I scroll everything on the page goes down except the google ad.I figured setting a DIV tag with style position: fixed; would be the easiest way of doing this and it works fine with Mozilla but it won't work in IE. In IE it just placed the ad at the top middle of the page regardless of what I put in the style box.What do you mean by valid doc type declatation?

Link to comment
Share on other sites

something like this :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Insert this as the very first line of your page. There are other options. This is for an HTML 4.01 STRICT page. Might want to use HTML 4 transitional. Have a look at the w3schools Tutorials for more info.And read this : http://tagsoup.com/cookbook/css/fixed/ to uderstand what you need to do to have IE render position:fxed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...