Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

layer position 2

Status
Not open for further replies.

jr2277

Technical User
Mar 17, 2005
6
0
0
US
I built an html page with a background image aligned to center position with layers placed inside. When I test the page and resize the browser window the background image stays centered but the layers remain in fixed position. Does anyone know how to tie a layer to a center aligned background so that the layer moves along with (in this case) the background image. Thanks.
 
there is a "position:relative" style for a layer, tou could use that:

<table align="center">
<tr><td>
<div style="position:relative;width:400px;height:400px;overflow:hidden">
<div position:absolute;left:25px;top:25px">
TheFloatingDiv
</div>
</div>
</td></tr>
</table>

Note that as the table changes the div also shifts...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top