skip to content rich footer

stevenclark.com.au

subscibe to the StevenClark.com.au rss feed

display: table and Firefox Intermittent Pain

If you’ve been following the launch of Hunter Island Press over the last 24 hours you might have noticed a bumpy ride. Most obviously floats going all over the place and various magenta borders being applied to all and sundry as I was madly trying to track down an intermittent issue in Firefox. Yes that was our favourite buddy Firefox draining my hours away (not Internet Explorer this time).

Problem: Intermittent Haywire Floats in Firefox

The problem in Firefox was that clicking around the site intermittently sent the floated layout into chaos in the content rich footer (and to some extent on a side element called galleria which has thumbnails of recent member galleries). Basically they forgot to clear and ended up stacked instead of floated in the layout. But only intermittently.

display:table in Firefox has Issues

The problem was finally tracked down (as was a very early suspicion I had) to the display: table used in the stylesheets on some containers. The three ways to get your floated elements to be properly contained are to use:

  • overflow: auto;
  • overflow: hidden;
  • display: table;

Cure: Use overflow instead of display: table

Simply exchange display: table with an overflow (so it still contains the floats correctly) and you’re away. The saying in this locale for that would be: now Bob’s your uncle.

I think the annoying aspect of dealing with this issue has been that it was intermittent - and they are bastards to track down from a time perspective - and that the offending browser was Firefox. Why it struck me on this project is because I don’t usually use display: table; but have tended to over-use it lately. Anyway, live and learn. Hopefully this post will save time for others down the track.

One Response to “display: table and Firefox Intermittent Pain”

  1. nortypig » Blog Archive » display: table and Firefox

    [...] you use display: table to contain floats you might want to look in Firefox for an intermittent error causing haywire [...]

Stand Up Guy

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

An icon for overweight middle aged bogun-geek web designers. A lego block in a Meccano world. A synergy of tattoos, memories of bare knuckle fist fights, and old episodes of Star Trek. My name is Steven Clark and I'm a highly opinionated web designer with a few good ideas. I'm too old for fist fights.

My Photography Blog

My photography blog Walk a Mile in my Shoes is back up and running. Due to bandwidth issues it's only one image at a time and not full text in the RSS feed. It's licensed under creative commons , meaning not for commercial use and you need to attribute, otherwise drop me a line via the contact form on this site.

My Links Blog

You might also like to check out my links blog over at Nortypig.com to learn more about everything worth mentioning.

My Illustrations

Currently I only have a static page for illustrations but if time allows I'd like to start another illustration blog.

Declaration of Independence

Site Content

Developed and published by Steven Clark

Site Supporters

Hosted by Brett at Tashosting

skip to top of page

Currently Reading

Here Comes Everybody by Clay Shirky (cover)

Clay Shirky's Here Comes Everybody: The Power of Organizing without Organizations has been on my bookshelf for the last few months literally screaming to be read. In fact, I'm wondering how I got so sidetracked to have reached the end of the year without having consumed it. The message of the book is an area of my own fascination, the effects that our new technologies have on the way we relate to each other, and how we're now empowered in ways that were historically unheard of (or not even conceived of) not too long ago.

I'm a small town boy who grew up in the seventies, graduating high school in 1979. The world was slower - how did we survive without Wikipedia? Without MSN or Facebook? Nowdays we have flashmobbing and blogging and constant connection.