Archive for the ‘Uncategorized’ Category

Best Way To Clear Floats

Saturday, June 28th, 2008

Float bug screenshot

One of the greatest challenges of a CSS developer would be dealing with floated elements that “spill” its contents outside the parent element. This is known as the float bug. Fortunately there are many techniques to address this issue. One method involves creating an additional blank element, which I find semantically wrong but it does get the problem fixed.

A “semantically correct” fix should only involve elements that already exist. The quirksmode.org technique is probably the best way to achieve this.

The code looks like this:

div.container {
	border: 1px solid #000000;
	overflow: hidden;
	width: 100%;
}

div.left {
	width: 45%;
	float: left;
}

div.right {
	width: 45%;
	float: right;
}

It is a purely CSS solution that does not require any additional tags. All you need to do is add a width and overflow rule to the parent element. The technique works flawlessly on all the major browsers: Internet Explorer 6+, Firefox 2+, Safari, and Opera.

Happy coding!

The Vault Is Back In Business

Tuesday, June 17th, 2008

After experiencing some downtime, the site is back in business. We have upgraded the blog site to Wordpress 2.5 and the interface update is looking real slick.

Beyond being a simple facelift, Wordpress 2.5 offers a bunch of new updates in functionality. For example, I’m really enjoying the new image uploader, which shows up as a lightbox type popup dialog as opposed to the inline uploader in the previous versions:

Wordpress 2.5 image uploader

There are still a ton of new options and I haven’t even had a chance to take a look at all of it but right now I just want to express how much I appreciate the work of our friends at Automattic.

Kudos! :)

We’re Back!

Tuesday, July 31st, 2007

After being out of commission for a while, CSS Vault is finally alive and kicking! :)

And we are kicking!

Monday, June 11th, 2007

At last, we had a blog. Hurray!