Layers within tables? |
Layers within tables? |
mcadmin |
Mar 27 2007, 11:05 AM
Post
#1
|
Group: Members Posts: 1 Joined: 27-March 07 Member No.: 2,346 |
I have some layers that I need because I'm using them in conjunction with a show/hide function. However, I only know how to create layers in "position:absolute". Every time I alter this latter part, it takes away the functionality of the layer. Rather than have the layers in a fixed position on the overall page, I want to have them always appear with in a table. Can anyone help me on this?
|
pandy |
Mar 27 2007, 12:14 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 |
I tell you only if you promise to get rid of he table.
An absolutely positioned box doesn't need to be positioned relative the browser window. It's positioned relative its "containing block". The containing block for an absolutely positioned box is its closest ancestor with a position other than static. If we have this HTML HTML <div id="outer"> <div id="inner"></div> </div> with this CSS CODE #outer { margin-top: 200px; width: 400px; height: 400px; background: yellow } #inner { width: 50px; height: 50px; background: red; position: absolute; top: 0; left: 0 } you'd expect the red square to be in the top left corner of the page and there's where it is. Now add the below line to the CSS and look again. CODE #outer { position: relative } http://www.w3.org/TR/CSS2/visudet.html#con...g-block-details |
Lo-Fi Version | Time is now: 27th April 2024 - 09:43 PM |