Working on a new website for our company (Inline boxmodel layout),
What I’ve done, worked pretty good untill the last adjustment.
Search :
Sales : +31 (0)10 290 65 25sales@cobeco.nlLanguage : English
The DIV “top”, which has a width of 100% and contains 2 levels of child DIV, lost it’s height as soon as the second level DIV’s (both anonymous) were inserted in the child DIV “topitems”.
The height of the anonymous DIV’s should define the height of the DIV “topitems”, which should define the height of “top” … but “top” dissapears, and all of the sudden needs a defined height to show.
Anyone an idea why that is? It worked perfectly with just the child DIV “top”, but as soon as “top” hosts it’s own child DIV’s … all goes wrong.
I think it has something to do with the floats inside your “top” div.
You need to clear them by inserting either a third div inside of
“topitems” (after the first two) that has the clear attribute set to
both, or by inserting it after “topitems” inside of the “top” div.
This is common practice (for me) when using inline layouts with floats
– to use a clearing div to reset behavior.
–
Ernie Simpson
On Tue, Sep 4, 2012 at 3:14 PM, Richard van Heukelum email@hidden wrote:
Working on a new website for our company (Inline boxmodel layout),
What I’ve done, worked pretty good untill the last adjustment.
Search :
Sales : +31 (0)10 290 65 25sales@cobeco.nlLanguage : English
The DIV “top”, which has a width of 100% and contains 2 levels of child DIV, lost it’s height as soon as the second level DIV’s (both anonymous) were inserted in the child DIV “topitems”.
The height of the anonymous DIV’s should define the height of the DIV “topitems”, which should define the height of “top” … but “top” dissapears, and all of the sudden needs a defined height to show.
Anyone an idea why that is? It worked perfectly with just the child DIV “top”, but as soon as “top” hosts it’s own child DIV’s … all goes wrong.
You can also set overflow to hidden on the parent. Counter-intuitively, this will cause all of the floated elements to appear (not to be cut off as you might imagine).
Walter
On Sep 4, 2012, at 3:48 PM, Ernie Simpson wrote:
I think it has something to do with the floats inside your “top” div.
You need to clear them by inserting either a third div inside of
“topitems” (after the first two) that has the clear attribute set to
both, or by inserting it after “topitems” inside of the “top” div.
This is common practice (for me) when using inline layouts with floats
– to use a clearing div to reset behavior.
–
Ernie Simpson
On Tue, Sep 4, 2012 at 3:14 PM, Richard van Heukelum email@hidden wrote:
Working on a new website for our company (Inline boxmodel layout),
What I’ve done, worked pretty good untill the last adjustment.
Search :
Sales : +31 (0)10 290 65 25sales@cobeco.nlLanguage : English
The DIV “top”, which has a width of 100% and contains 2 levels of child DIV, lost it’s height as soon as the second level DIV’s (both anonymous) were inserted in the child DIV “topitems”.
The height of the anonymous DIV’s should define the height of the DIV “topitems”, which should define the height of “top” … but “top” dissapears, and all of the sudden needs a defined height to show.
Anyone an idea why that is? It worked perfectly with just the child DIV “top”, but as soon as “top” hosts it’s own child DIV’s … all goes wrong.
Walter, you are still schoolin’ me after all these years
–
Ernie Simpson
On Tue, Sep 4, 2012 at 3:51 PM, Walter Lee Davis email@hidden wrote:
You can also set overflow to hidden on the parent. Counter-intuitively, this will cause all of the floated elements to appear (not to be cut off as you might imagine).
Walter, you are still schoolin’ me after all these years
–
Ernie Simpson
On Tue, Sep 4, 2012 at 3:51 PM, Walter Lee Davis email@hidden wrote:
You can also set overflow to hidden on the parent. Counter-intuitively, this will cause all of the floated elements to appear (not to be cut off as you might imagine).