|
-
Nov 23rd, 2003, 08:22 AM
#1
Thread Starter
Frenzied Member
Doctype
I'm trying to use:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML 1.0 transitional as my DOCTYPE on a page. Everything works fine, except for a 'Floating DIV' I have a DIV that stays at a certain location on the screen even after scrolling. Here's the function:
Code:
function doIt() {
document.getElementById('sd').style.top = document.body.scrollTop + 50
}
and in the body tag I have onScroll="doIt()"
Now, this script works if I remove the DOCTYPE bit, but I want to keep it, or at least have a DOCTYPE. Does anyone know of any DOCTYPE that supports this, or do you know how to get around this?
Have I helped you? Please Rate my posts. 
-
Nov 25th, 2003, 06:09 AM
#2
Does the div have an id attribute or only a name attribute? It needs an id attribute.
However that might not be it.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 25th, 2003, 10:04 AM
#3
Thread Starter
Frenzied Member
it is a id
I think it is the scrollTop bit. I don't think that actually exists in any proper versions of HTML.
Have I helped you? Please Rate my posts. 
-
Nov 25th, 2003, 11:07 AM
#4
It's a possibility. Not that it doesn't exist, but IE has differences in scripting when in standards (*cough*) mode. It might have a different value.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|