I have a layout set up, and I added a wrapper to keep everything in place, the wrapper's background is white, but now I'm trying to add a footer with a different colored background but for some reason it is still white.

Oh I thought overflow hidden was so if an element left the space it wouldn't show up.

RyanReese
—
2010-02-28T01:18:12Z —
#4

That's the main job of overflow:hidden;. It will clip it if a width or height is set (if a width is set it will clip horizontally, if a height, vertically). If no height is set then it just does float containment (in this case)

However it, like superman, has a side job :). It wasn't an expected thing of overflow:auto/hidden, but it can contain floats, which is what Ray was telling you to do :). The containment that overflow:auto/hidden gives is like Clark Kent going into superman..;)

theGermz
—
2010-02-28T01:34:04Z —
#5

RyanReese said:

That's the main job of overflow:hidden;. It will clip it if a width or height is set (if a width is set it will clip horizontally, if a height, vertically). If no height is set then it just does float containment (in this case)

However it, like superman, has a side job :). It wasn't an expected thing of overflow:auto/hidden, but it can contain floats, which is what Ray was telling you to do :). The containment that overflow:auto/hidden gives is like Clark Kent going into superman..;)

Hahaha that was an awesome explanation :lol: I'm gonna use overflow:hidden every chance I get

RyanReese
—
2010-02-28T03:05:51Z —
#6

Not every chance you get, just when you need to contain your floats (or clip content )

Stomme_poes
—
2010-02-28T10:01:05Z —
#7

I'm gonna use overflow:hidden every chance I get

To continue on what Ryan said, watch out: overflow:hidden has a Day Job! Hiding overflow!

A lot of the time, possibly most of the time, you will want browsers to allow children of boxes to be able to flow out of those boxes. CSS tooltips inside a restricted-sized container for example. If you are using overflow: hidden and you're losing stuff, missing text, then you know that's the issue.

Sometimes for that reason you end up needing to use some other technique to either clear floats or get them enclosed... there are about 4 or so techniques. overflow: hidden is just the easiest a lot of the time.

RyanReese
—
2010-02-28T17:04:34Z —
#8

Stomme_poes said:

To continue on what Ryan said, watch out: overflow:hidden has a Day Job! Hiding overflow!

A lot of the time, possibly most of the time, you will want browsers to allow children of boxes to be able to flow out of those boxes. CSS tooltips inside a restricted-sized container for example. If you are using overflow: hidden and you're losing stuff, missing text, then you know that's the issue.

Sometimes for that reason you end up needing to use some other technique to either clear floats or get them enclosed... there are about 4 or so techniques. overflow: hidden is just the easiest a lot of the time.

Off Topic:

I was going to use the batman analogy, day job being Bruce Wayne, night job batman :p.

Stomme_poes
—
2010-02-28T19:31:53Z —
#9

Off Topic:

I've been saying "Day Job" for a while, as that's kinda its main purpose in life, whereas the enclosing of floats is a sort of happy incidental side effect. Some people seem to forget that it doesn't just enclose floats : )