Schuyler Kuhl
asked on
relative positioning of <div> tag for a page with a centered layout
Greetings,
I have a site (http://www.themaurypeople.com/featured.php) where I want to take an existing layout and center it.
The whole page is in a table and I would like to just center the table as such:
<table width="800" border="0" cellspacing="0" cellpadding="0" align=center>
Currently there is a small image that is overlapped over a larger using a div tag such as this:
<div id="Layer1" style="position:absolute; left:16px; top:126px; width:110px; height:177px; z-index:1">
My question is, how can I make the positioning of this div tag relative to the centered table and the top of the page or perhaps relative to the image below it?
I am knowledgeable in web development generally but not an expert at css positioning.
Thanks very much
Schuyler
I have a site (http://www.themaurypeople.com/featured.php) where I want to take an existing layout and center it.
The whole page is in a table and I would like to just center the table as such:
<table width="800" border="0" cellspacing="0" cellpadding="0" align=center>
Currently there is a small image that is overlapped over a larger using a div tag such as this:
<div id="Layer1" style="position:absolute; left:16px; top:126px; width:110px; height:177px; z-index:1">
My question is, how can I make the positioning of this div tag relative to the centered table and the top of the page or perhaps relative to the image below it?
I am knowledgeable in web development generally but not an expert at css positioning.
Thanks very much
Schuyler
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.
I think I got it.
I put my fixed image inside a <div> tag and set it to position: absolute.
Then I had my other image set to position:relative.
Thanks again for your help.
Sky
I think I got it.
I put my fixed image inside a <div> tag and set it to position: absolute.
Then I had my other image set to position:relative.
Thanks again for your help.
Sky
<div id="Layer5" style="position:absolute; z-index:1"><img src-"image.jpg></div>
<div id="Layer1" style="position:relative; left:16px; top:7px; z-index:2">
<img src="image2.jpg"></div>
ASKER
By modifying the positioning to relative I have the picture positioned as I want. However it is pushing down the content below it.
http://www.themaurypeople.com/homeowners.php
There is only one <div> tag, so I am not sure how it will chose its parent element.
Sky
Open in new window