i have a page that shows a random picture, centered.
how do i create a layer that stays centered, but always 300 px down
from the top?
to make it clear again: i want to place a text layer, x=centered,
y=300.
is it even possible, or do layers have get absolute positions?
Tobi Hammert schrieb:
> i have a page that shows a random picture, centered.
> how do i create a layer that stays centered, but always 300 px down
> from the top?
>
> to make it clear again: i want to place a text layer, x=centered,
> y=300.
margin: 300px auto 0 auto;
width: 45em; /* e.g. */
What about the 'same height' from the subject?

Signature
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Tobi Hammert - 27 Jan 2007 15:38 GMT
hm... this does not work.
the text layer should be placed on top of the picture...
now its just adding the 300px and putting the text under the picture.
but i want the text to cover the pic.
> Tobi Hammert schrieb:
>
[quoted text clipped - 11 lines]
> Spem in alium nunquam habui praeter in te, Deus Israel.
> (Thomas Tallis, 40-part motet)
Ben C - 27 Jan 2007 15:57 GMT
> hm... this does not work.
> the text layer should be placed on top of the picture...
The problem is we don't know what the rest of your document looks like.
It would work in many circumstances. Post a link to your page.
> now its just adding the 300px and putting the text under the picture.
> but i want the text to cover the pic.
This is a similar suggestion:
div.text_layer
{
position: absolute;
width: 10em;
margin: 0 auto;
top: 300px;
left: 0;
right: 0;
}
...
<div class="text_layer">text</div>
That will probably put the text layer on top if the image is
normal-flow. But it all depends on the rest of the document which we
can't see!