position:absolute problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a 3 column header.
the left and right columns have images.
the left column has text positioned absolutely over the image.
When I put text in the center column, it winds up in the left column
positioned according to the css for the left column.

How do I get it so the text stays in the center column as wanted?
I tried position:absolute with the center column but that didn't work.

Re: position:absolute problem

On Tue, 19 Nov 2013 20:32:05 -0500, richard wrote:
Quoted text here. Click to load it

One trick is to put the text DIV/SPAN before the IMG, then make the DIV/SPAN

position:absolute; z-index:9;

You might need to need increase the "z-index" if the text is still beneath
the IMG.

To adjust the text position, use "margin" instead of "left" and "top". The
margin position will be relative to the current position. e.g.:

margin: 20px 0 0 20px;

Re: position:absolute problem

Quoted text here. Click to load it

URL of the page with the problem?

Re: position:absolute problem

Quoted text here. Click to load it

Remember that absolute positioning takes elements out of the flow, it  
is often as if the rest of the HTML is blind to it, so you need to  
make sure the left margin for the centre column is sufficient to clear  
the width you have for the abs pos element.


Site Timeline