Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > position:absolute problem

Reply
Thread Tools

position:absolute problem

 
 
richard
Guest
Posts: n/a
 
      11-20-2013
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.
 
Reply With Quote
 
 
 
 
JJ
Guest
Posts: n/a
 
      11-20-2013
On Tue, 19 Nov 2013 20:32:05 -0500, richard wrote:
> 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.


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

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;
 
Reply With Quote
 
 
 
 
Doug Miller
Guest
Posts: n/a
 
      11-20-2013
richard <(E-Mail Removed)> wrote in news:(E-Mail Removed):

> 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.


URL of the page with the problem?
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      11-20-2013
In article <(E-Mail Removed)>,
richard <(E-Mail Removed)> wrote:

> When I put text in the center column, it winds up in the left column
> positioned according to the css for the left column.


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.

--
dorayme
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one get an absolute absolute file path? James Byrne Ruby 3 09-14-2010 06:02 PM
Problem with panel with absolute position Dimitris Milonas ASP .Net 3 10-21-2007 05:32 PM
Problem with CSS absolute position/overflow scroll Adam Plocher HTML 4 05-26-2006 06:10 PM
Where is Form Relative Position and Absolute Position in VS.Net 2005 ? Luqman ASP .Net 1 02-07-2006 10:27 AM
Help, bizarre Mozilla absolute position <div> problem nick Javascript 8 05-08-2004 11:34 PM



Advertisments