Fixing the IE z-index bug.

Posted by & filed under CSS.

We all know that IE is full of bugs and just plain sucks as a browser… if you didn’t know that you can drop your geek badge off on the way out. So today I ran across the Z-Index bug in IE7.

Sometimes you’ve seen this behavior before:
Screen shot 2010-05-13 at 12.15.21 PM.png

The fix is to give the parent of the element with a z-index a slightly higher z-index

Content Here

Resources:
http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/

An Solution To Clearing Floats

Posted by & filed under CSS.

I used to clear floats by adding the CSS style clear: both to the element underneath the floating elements. This was a pain because sometimes you had to add a
tag under it with the clear: both set. Then while searching for a better way (there is always a better way) to clearing floats I found the [overflow](http://www.sitepoint.com/blogs/2005/02/26/simple-clearing-of-floats/ “SitePoint Blogs » Simple Clearing of Floats”) rule.

Essentially, just add

overflow: hidden