CSS Best Practice #3: Clear Floated Containers (with Height||Width and Overflow)

I know you\’ve done it before. I think we\’ve all done it. You have a container with a floated element inside. The container doesn\’t wrap around everything, thus causing the element to break outside of the container. To fix this, we\’d usually add a clear element at the bottom of the container so it would wrap everything within. But there is a better solution, which uses two CSS properties. For this example, I\’ll place the styles inline.. please don\’t hate me. Continue reading CSS Best Practice #3: Clear Floated Containers (with Height||Width and Overflow)

Solution to Flash and Select Drop-downs Covering HTML Elements

I\’ve positioned elements absolutely and had to deal with a bug where the element appears below a flash object or select drop-downs, which usually occurs in IE. I\’ve seen a few solutions, which work great, and I have one more to add. Continue reading Solution to Flash and Select Drop-downs Covering HTML Elements

Dustin Diaz on DocTypes

I just had to share this one with you as soon as I read it. Dustin Diaz shows us a way of declaring a doctype, that puts the browser is standards mode. Thought it won\’t validate, which he explains:

There is really, absolutely no reason you need the rest of the doctype in your declaration unless you’re validating code. Furthermore, it does not mean that your page is even invalid. In the end, it puts your webpages into standards mode, which is what really matters.

Continue reading Dustin Diaz on DocTypes