First of all, is there a reason why you can't make the outer div the one
which responds to the event which currently causes the nested div to
expand? That would be the more natural way to accomplish this.
If that's not workable, what event makes the nested tag expand? Try to
make a call there to a javascript function which resets the style of the
parent div, like this code hacked from one of our projects:
<HTML>
<BODY>
<script language="javascript">
<!-- hide
function ShowOffice(office,uparrow,dnarrow) {
office.style.display = "";
dnarrow.style.display = "none";
uparrow.style.display = "";
}
function HideOffice(office,uparrow,dnarrow) {
office.style.display= "none";
uparrow.style.display = "none";
dnarrow.style.display = "";
}
// -->
</script>
<table>
<tr>
<td id="dnarrow1"><a
href="javascript:ShowOffice(office1,uparrow1,dnarrow1)">Open</a></td></t
d>
<td id="uparrow1" style="display:none"><a
href="javascript:HideOffice(office1,uparrow1,dnarrow1)">Close</a></td>
</tr>
<tr><td colspan="2" id="office1" style="display:none">Here's the hidden
stuff!</td></tr>
</table>
</BODY>
</HTML>
-----Original Message-----
From: joee@v... [mailto:joee@v...]
Sent: Wednesday, July 03, 2002 3:58 PM
To: HTML Code Clinic
Subject: [html_code_clinic] Nested Div Tags
I have a nested div tag in a "shell" div tag. The nested div tag has a
menu in it that expands. When the menu inside of the nested div tags
expands the outer, "shell" div tag, is not expanding with it. How can I
accomplish that?
Thanks
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20