talideon.com

I shall now proceed to rock out

September 3, 2004 at 3:35PM Floats fixed forever!

I had an epiphany last night. I was looking at Position Is Everything last night and I found an article detailing the Peekaboo bug.

This is something that’s plagued me for a long time. In the previous talideon.com, text in the page would disappear for no good reason, leaving me to scratch my head in puzzlement.

What I discovered from the page was that if you put a width on the divs in question, this goes away.

But it doesn’t stop there, and here’s where the post title comes in. I discovered from the site that there’s a rather useful bug in IE where if an element contains floats and has a width on it, its height will automatically expand to clear those divs. Woohoo! But what about other browsers?

For that, there’s the good old after pseudoattribute It lets you bung in extra content into the element it’s applied to. I’m not going to detail it here (mainly because I need to add preformatted blocks to my formatting code), but you can read about doing it here. The nifty thing about all this is that you no longer have to clog up your pages with cruft to clear them.

Technorati Search Technorati Search Irish Bloggers

Comments

No comments.

Post a comment

All form information is optional, but it’s a good idea to fill in your name and email address if you want me to take your comment seriously.

Spammers, don’t bother posting crap down here. The site is set up so that legitimate search engines (Google, for instance) won’t index pages with comments on them. Posting crud here only means you’re wasting my time and patience. Shoo!

Real names, please. Please include!
Won’t be displayed. Please include!
Displayed, if present.