Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: CSS - Is THIS Possible?

  • Subject: Re: CSS - Is THIS Possible?
  • From: Spartanicus <me@privacy.net>
  • Date: Sun, 05 Dec 2004 14:00:14 +0000
  • Newsgroups: alt.html
  • References: <cout1d$2u0l$1@godfrey.mcc.ac.uk>
  • Xref: news.mcc.ac.uk alt.html:272492
Roy Schestowitz <newsgroups@schestowitz.com> wrote:

>#Div_png_top {
>        font-size: 40px;
>        text-align: center;
>        position:fixed;
>        top:10px;
>        right: 300px;
>        background:url(/IMG/blog_css/up.png) no-repeat top left;
>        width:50px;
>        height:50px;
>}
>
>My question is: can the line
>
>right: 300px;
>
>be replaced so that the object always appears in the _center_? I tried many
>things to no avail.

It can only be done properly if you set the width as a percentage of the
containing block's width, for example:

width:20%;right:40%;left:40%;

It needs to total to 100%.

-- 
Spartanicus

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index