show/hide blocks in list items

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
sorry for the crosspost, but I'm not sure if my problem is with the HTML or
the CSS :-(


I have a list with in each list item a text + link which are always visible,
and a blockquote which can be shown or hidden by clicking the link.
Showing/hiding works, but the blockquote's margins behave a bit strange.
I'll try to explain, though the best way to understand what happens is to go
and see on the page itself.

1. when I show a block with no blocks visible, I don't get the bottom margin
I want.
2. when I show a block with the *next block visible*, I do get the bottom
margin (and the other block becomes hidden as it should).
3. when I hide a block with the bottom margin present, the margin remains
even though the block is invisible.
4. Now I have, say, list item 3 where the blockquote is hidden, but it's
margin is visible. The margin only disappears when I show the *next* list
item's blockquote (4 in this case).

I hope the description makes sense. Just tell me if it needs clarification.

Now all this happens in FF1; even IE6 gets it right! (I mean, normally it's
the other way around).
Am I using the wrong structure, I mean the blockquote within the list item?
Other stupid mistakes?
Any help will be rewarded with eternal gratitude.


Re: show/hide blocks in list items


I succedded by changing the style to

position: absolute;
visibility: hidden;

This may help you.

New computer algebra system: /
My website: /
Quoted text here. Click to load it

Re: show/hide blocks in list items

(top post corrected)
Quoted text here. Click to load it

Thanks for the reply Martin.
It doesn't seem to work though: when I add the properties to the blockquote
style nothing happens. And when I add them to the paragraph's style, the
margin problem remains, but the blockquote's text doesn't show, just the
border as a thick horizontal line.
Could you post your code? Sure it worked in *Firefox*?


Site Timeline