I would be grateful for recommendations for a CSS layout (header, 2 cols,
footer) that can accomodate dynamically added elements. I am not having any
luck so far getting this to work in Mozilla/Firefox. Success so far only
with IE. In Mozilla/Firefox, the layout does not adjust when nodes are
inserted into the document dynamically.
Layout:
H E A D E R
COL1 COL2
F O O T E R
Content on the page can change in two ways:
1. User clicks on a link in COL1, which makes a corresponding DIV in COL2
visible and the others there invisible.
The DIVS in COL2 are not all the same length. Sometimes the visible DIV will
have 10 lines, say, and at others, 20.
Mozilla/Firefox handles this OK.
2. COL2 also contains an expanding menu. When the user clicks on a menu-item
in COL2, dynamic HTML content is fetced from the database and injected into
COL2 below the clicked-on link: an element containing nodes is added to the
DIV using .insertBefore method. The dynamic insertion of the element causes
the length of COL2 to change dramatically.
Mozilla/Firefox does not handle this. When HTML is added dynamically to
COL2, the FOOTER DIV (in Firefox) stays just where it was, and the
dynamically injected content overwrites the footer and extends down below
it. The footer is acting as though it were absolutely positioned. The FOOTER
DIV's vertical position should adjust according to the new length of COL2.
Thanks in advance
Xav
footer) that can accomodate dynamically added elements. I am not having any
luck so far getting this to work in Mozilla/Firefox. Success so far only
with IE. In Mozilla/Firefox, the layout does not adjust when nodes are
inserted into the document dynamically.
Layout:
H E A D E R
COL1 COL2
F O O T E R
Content on the page can change in two ways:
1. User clicks on a link in COL1, which makes a corresponding DIV in COL2
visible and the others there invisible.
The DIVS in COL2 are not all the same length. Sometimes the visible DIV will
have 10 lines, say, and at others, 20.
Mozilla/Firefox handles this OK.
2. COL2 also contains an expanding menu. When the user clicks on a menu-item
in COL2, dynamic HTML content is fetced from the database and injected into
COL2 below the clicked-on link: an element containing nodes is added to the
DIV using .insertBefore method. The dynamic insertion of the element causes
the length of COL2 to change dramatically.
Mozilla/Firefox does not handle this. When HTML is added dynamically to
COL2, the FOOTER DIV (in Firefox) stays just where it was, and the
dynamically injected content overwrites the footer and extends down below
it. The footer is acting as though it were absolutely positioned. The FOOTER
DIV's vertical position should adjust according to the new length of COL2.
Thanks in advance
Xav
Comment