skip to content rich footer

stevenclark.com.au

subscibe to the StevenClark.com.au rss feed

Keep an eye out for me on Facebook and Twitter

Archive for January, 2008

Contain Floats Without Adding Structure

Thursday, January 31st, 2008

Nothing about this post is new or unknown to many people much smarter than myself. I don’t usually post CSS solutions here because there are fantastic resources out there already. This CSS problem is simple – an outer div contains floats. The floats pop out the bottom of the div and this is shown best by putting a simple border on the div to show its got no height. This is exactly what’s meant to happen.

But if we’ve got a situation where we want floated content to stay wrapped within the div what do we do?

Problem: Uncontained float is not inside the div

I’m posting this because nearly every time I see advice on this question the answer put forward is to add an extra div into your markup at the end of the initial enclosing div (after the floated content) and setting the CSS to clear that element. That’s simply clear: both;.

Read the rest of this entry »

About the Author

Steven Clark Steven Clark - the stand up guy on this site

My name is Steven Clark and my passions are business, web development, photography and writing. My current CV [PDF 775KB] discusses relevant work history and interests. Currently I'm in the second half of a post-graduate university degree of MBA (Journalism and Media Studies) at the University of Tasmania.

Social Networks

Lo and behold I now happen to inhabit the realms of Facebook and Twitter so see you over there.

Photography

My fine art photography is available online at Steven Clark Studio. You may also enjoy my photo blog Walk a Mile in my Shoes.

Recently Reviewed Books

Site Supporters

Hosted by Brett Drinkwater at Tashosting who is always there at the other end of my every inconvenient question and technical crisis. Brett's local community support for us over the last five years is greatly appreciated.

skip to top of page
Currently Reading The Accidental Guerrilla by David Kilcullen

Late last year I watched an address to the Australian National Press Club from counter-terrorism expert and author of The Accidental Guerrilla: Fighting Small Wars in the Midst of a Big One , David Kilcullen. In that address he mentioned the period after World War 2 when, in retrospect, we had wars against colonialisation as countries pushed back against dominating forces. Similarly, when we look back at the current wars we’ll see them as wars against globalisation – people pushing back against the tide of world wide Americanisation and globalised culture. David Kilcullen is there to inform us that what the American government are group-labeling global terrorists are more often than not local insurgents with local concerns. Understanding this crucial point and unraveling the complexity of the enemy is crucial to America's success in the field.