Subject: [css-d] z-index problems

From: bob.jones at usg.edu (Bob Jones)
Date: Thu, 24 Apr 2003 11:08:04 -0400

On Thu, Apr 24, 2003 at 07:57:14AM -0700, [email-masked] wrote:
# 
# In both circumstances, change your position declaration in .lyrics from
# relative to absolute. Relatively positioned content will take up space in
# the content, regardless of its visibility. When its display property is
# changed from "none" to "block", it simply reinserts the content into the
# flow. Giving it absolute positioning ensures that it will appear on the
# page without modifying the flow of surrounding content.

I was afraid you would say that.  Unfortunately, in order to keep my 
layout fluid, absolutely positioning that content isn't an option.  So, 
unless someone here has a neat trick to do what it is I'm wanting to do, 
I'll have to abandon these plans.

Thanks,
Bob

---

From: akuehn at nc.rr.com (Adam Kuehn)
Date: Thu, 24 Apr 2003 12:25:06 -0400

>I'll have to abandon these plans.

I haven't checked out this solution, so take it with a grain of salt:

Absolute positioning shouldn't affect the fluidity of your layout, if 
you do it correctly.  If you absolutely position something, it is 
positioned with respect to it's containing block.  That containing 
block is defined to be the nearest ancestor with a position other 
than "static".  Since "static" is also the default position for every 
element, you would therefore need to position the element which 
contains the hidden/invisible content in question - in other words, 
position the list item.  Try "relative" on the li, then "absolute" on 
the paragraph and see if that does what you are looking for.

Incidentally, to be a bit more semantically correct, you should 
actually make the invisible/hidden element a div , rather than a 
paragraph (positioned as explained).  Each verse could then be marked 
up as a paragraph, with no additional positioning required.

-- 

-Adam Kuehn