BillSaysThis
08-14-2005, 01:19 AM
Please feel free to razz me if this is a totally noob question and I should be doing browser detection and such to handle this situation. Hopefully the answer is simpler than that.
I want to show a list of items and if the user clicks an item, show some text. So the HTML includes a <div id="xxx"></div> after each item, with CSS visibility: hidden and onclick I update the div's innerHTML with the text and visibility to visible. So far so good.
When the user clicks again I want to remove the text and revert to the previous display; I set innerHTML="" and visibility: hidden. This works fine on Firefox but on IE a blank line is left. I tried setting top and bottom margins to 0 but that had little effect.
So, what am I doing wrong?
Thanks,
Bill
I want to show a list of items and if the user clicks an item, show some text. So the HTML includes a <div id="xxx"></div> after each item, with CSS visibility: hidden and onclick I update the div's innerHTML with the text and visibility to visible. So far so good.
When the user clicks again I want to remove the text and revert to the previous display; I set innerHTML="" and visibility: hidden. This works fine on Firefox but on IE a blank line is left. I tried setting top and bottom margins to 0 but that had little effect.
So, what am I doing wrong?
Thanks,
Bill