Originally posted by: jjones
Originally posted by: igowerf
Originally posted by: danklumpp
Thanks jjones
I like to know why things are done, and I'm just curious why the third div is needed inside the container.
The third inner div is for "clearing" the floats. When all of the inner divs are floated, the parent div doesn't expand out to actually contain them. jjones uses the third div with the clear attribute to force the parent div to expand. Read more about it here:
http://positioniseverything.net/easyclearing.html
Thanks, you explained that probably much better than I would have.
BTW, that's an interesting article. I'll still stick to the "old-fashioned" way though. I avoid using any hacks unless there is absolutely no other way to do what I want. I'd much rather have an additional line in my html than messy CSS that might break sometime down the road. Just my opinion though; I know lots of people use hacks.