Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to Stretch a Layer with Another Layer

How to Stretch a Layer with Another Layer
Thread Tools
Mac Elite
Join Date: Jan 2004
Location: Berkeley, CA
Status: Offline
Reply With Quote
Jul 20, 2005, 01:34 PM
 
I am placing absolutely positioned layers within another layer, but because they are absolutely positioned, the layer they are in is not stretching to accomodate them. Is there a way around this? I want to have two columns, and the only way to do that seems to be the use of absolute positioning. If there is another way, please inform me, but I am still curious about the original question. Thanks for any help .

Edit: Please read this for the most recent updates on my situation.
(Last edited by tavilach; Jul 20, 2005 at 02:02 PM. )
"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world." -Archimedes
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 20, 2005, 03:07 PM
 
original question: the answer is no.

two column layouts are a very well covered topic.

The gist of it is to float (or absolutely position) one column, and then add margin or padding to the other to leave room for it.
(Last edited by registered_user; Jul 20, 2005 at 03:07 PM. (Reason:bbcode))
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 20, 2005, 03:40 PM
 
Have you tried putting overflow: auto on the "layer" which contains the two columns? The behavior of this seems to be somewhat inconsistent -at least in Mozilla- but usually it causes the div to stretch and accommodate floats. It might work for this too, though I'm not certain.

If you do make this work, by the way, could you please post code? I'm working on a similar problem that I'm trying to solve by other means, but if this works then I'll take it.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 20, 2005, 03:57 PM
 
overflow: auto; does not work on absolutely positioned elements, just floats. And in IE just floats that have layout. That big dumb browser.
     
Dedicated MacNNer
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 20, 2005, 10:08 PM
 
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 21, 2005, 06:04 AM
 
Originally Posted by ppmax
That only works in IE/Windows, though. It's made to not interfere with other browsers. It's the best out there for what it does -fix IE problems- but it doesn't do what the poster is looking for.

That said, JavaScript is one possible solution. You could use it to get the calculated heights of all the "inside" layers, find the tallest, and stretch the "outside" layer to match.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Dedicated MacNNer
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 21, 2005, 11:32 AM
 
>>That only works in IE/Windows
I know.

>> but it doesn't do what the poster is looking for.
Whoops: I misread the OP and someone else's post.
     
   
Thread Tools
Forum Links
Forum 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 On
Top
Privacy Policy
All times are GMT -5. The time now is 09:22 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2