G
Gerard Seibert
I am having a problem that I can just not figure out. If I run the following, it will produce a jumble of text at the top of the screen. However, if I remove the !DOCTYPE declaration, it will work perfectly.
This is the HTML code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test of Positioning</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="copyright" content="Copyright © 2003, Bud Man">
<meta name="description" content="Your DESCRIPTION TEXT here">
<meta name="keywords" content="Your KEYWORDS TEXT here">
<meta name="rating" content="General">
<meta name="robots" content="Index, follow">
<style type="text/css">
P {behavior:url(pos.htc);
border:1px black solid;
font:10pt geneva, arial;
padding:2pt}
</style>
</head>
<body>
<p vpos="top" hpos="left"><nobr>Top-Left</nobr></p>
<p vpos="top" hpos="center"><nobr>Top-Center</nobr></p>
<p vpos="top" hpos="right"><nobr>Top-Right</nobr></p>
<p vpos="middle" hpos="left"><nobr>Middle-Left</nobr></p>
<p vpos="middle" hpos="center"><nobr>Middle-Center</nobr></p>
<p vpos="middle" hpos="right"><nobr>Middle-Right</nobr></p>
<p vpos="bottom" hpos="left"><nobr>Bottom-Left</nobr></p>
<p vpos="bottom" hpos="center"><nobr>Bottom-Center</nobr></p>
<p vpos="bottom" hpos="right"><nobr>Bottom-Right</nobr></p>
</body>
</html>
This is the code for pos.htc:
<PUBLIC:COMPONENT NAME="ID_POSITION">
<PUBLIC
ROPERTY NAME="vpos">
<PUBLIC
ROPERTY NAME="hpos">
<SCRIPT>
// Copyright 1999 InsideDHTML.com, LLC. All rights reserved.
// For more information, see www.insideDHTML.com
// This behavior can be reproduced as long as this copyright
// notice is not removed.
var hExpr = "",vExpr = ""
switch (vpos) {
case "top":
vExpr="document.body.scrollTop+offsetHeight-offsetHeight"
break;
case "middle":
vExpr="document.body.scrollTop+((document.body.clientHeight-offsetHeight)/2)"
break;
default:
vExpr="document.body.scrollTop+document.body.clientHeight-offsetHeight"
}
switch (hpos) {
case "left":
hExpr="document.body.scrollLeft+offsetLeft-offsetLeft"
break;
case "center":
hExpr="document.body.scrollLeft+((document.body.clientWidth-offsetWidth)/2)"
break;
default:
hExpr="document.body.scrollLeft+document.body.clientWidth-offsetWidth"
}
style.position = "absolute"
style.setExpression("top",vExpr)
style.setExpression("left",hExpr)
</SCRIPT>
</PUBLIC:COMPONENT>
I would appreciate any help that someone could give me.
Thanks!
Gerard E. Seibert
(e-mail address removed)
I am just an old country boy in a big town trying to get along. I have been eating pretty regular and the reason I have been is because I have stayed an old country boy.
- Will Rogers
This is the HTML code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test of Positioning</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="copyright" content="Copyright © 2003, Bud Man">
<meta name="description" content="Your DESCRIPTION TEXT here">
<meta name="keywords" content="Your KEYWORDS TEXT here">
<meta name="rating" content="General">
<meta name="robots" content="Index, follow">
<style type="text/css">
P {behavior:url(pos.htc);
border:1px black solid;
font:10pt geneva, arial;
padding:2pt}
</style>
</head>
<body>
<p vpos="top" hpos="left"><nobr>Top-Left</nobr></p>
<p vpos="top" hpos="center"><nobr>Top-Center</nobr></p>
<p vpos="top" hpos="right"><nobr>Top-Right</nobr></p>
<p vpos="middle" hpos="left"><nobr>Middle-Left</nobr></p>
<p vpos="middle" hpos="center"><nobr>Middle-Center</nobr></p>
<p vpos="middle" hpos="right"><nobr>Middle-Right</nobr></p>
<p vpos="bottom" hpos="left"><nobr>Bottom-Left</nobr></p>
<p vpos="bottom" hpos="center"><nobr>Bottom-Center</nobr></p>
<p vpos="bottom" hpos="right"><nobr>Bottom-Right</nobr></p>
</body>
</html>
This is the code for pos.htc:
<PUBLIC:COMPONENT NAME="ID_POSITION">
<PUBLIC

<PUBLIC

<SCRIPT>
// Copyright 1999 InsideDHTML.com, LLC. All rights reserved.
// For more information, see www.insideDHTML.com
// This behavior can be reproduced as long as this copyright
// notice is not removed.
var hExpr = "",vExpr = ""
switch (vpos) {
case "top":
vExpr="document.body.scrollTop+offsetHeight-offsetHeight"
break;
case "middle":
vExpr="document.body.scrollTop+((document.body.clientHeight-offsetHeight)/2)"
break;
default:
vExpr="document.body.scrollTop+document.body.clientHeight-offsetHeight"
}
switch (hpos) {
case "left":
hExpr="document.body.scrollLeft+offsetLeft-offsetLeft"
break;
case "center":
hExpr="document.body.scrollLeft+((document.body.clientWidth-offsetWidth)/2)"
break;
default:
hExpr="document.body.scrollLeft+document.body.clientWidth-offsetWidth"
}
style.position = "absolute"
style.setExpression("top",vExpr)
style.setExpression("left",hExpr)
</SCRIPT>
</PUBLIC:COMPONENT>
I would appreciate any help that someone could give me.
Thanks!
Gerard E. Seibert
(e-mail address removed)
I am just an old country boy in a big town trying to get along. I have been eating pretty regular and the reason I have been is because I have stayed an old country boy.
- Will Rogers