Posted by Jonathan N. Little on 11/27/98 11:58
Rob Powell wrote:
> hi all
>
> i was wondering
>
> is there a way to give a CSS class a position screen-width-relative? ie,
> can i have a class having some properties like "horizontal positioning =
> (screen.width / 2) - 350"... ? :-)
>
> thanks in advance
> rob
Not directly, but this way will do it:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
#pushpin {
position: absolute; left: 50%; margin-left: -350px;
width: 10em; border: 1px solid black;
}
</style>
</head>
<body>
<div id="pushpin">Here I am!</div>
</body>
</html>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|