You are here: Re: Css Positioning "Screen-Width-Relative" « HTML « IT news, forums, messages
Re: Css Positioning "Screen-Width-Relative"

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация