Soapbox - dylan’s online rantspace

CSS Display Block issue with tables in firefox

August 11th, 2006 by Dylan Hall

A quick note, something that’s been bugging me for a week and a half at work - I have a table that is being hidden and displayed using javascript and display: block;/display: none;

In IE this was all fine and good, however whenever firefox displayed the table it lost it’s width formatting.

The trick is to set any table to ‘display: table;’ - not something i’ve used before. tables, in my understanding, should display as block elements and retain formatting like width etc, but firefox does have a few small things like this you need to be careful of.

This page on quirksmode.org details the various display modes nicely, although it doesn’t refer to this particular quirk.

Please note, IE6 does not support ‘display: table;’ so you have to make sure you do a browser detect and ensure the code for IE still uses ‘display: block;’

gotta love the incompatibility..

Moving, and all that jazz

August 9th, 2006 by Dylan Hall

Working..

June 11th, 2006 by Dylan Hall

Just a quick note to anyone who may have e-mailed me

June 5th, 2006 by Dylan Hall

Shits and giggles. Writing again!

June 2nd, 2006 by Dylan Hall

Suicide Girls and Gerling

April 9th, 2006 by Dylan Hall

Microsoft Ipod Parody

March 23rd, 2006 by Dylan Hall

Fat people and eskimos (aka capatilism is killing us all)

March 21st, 2006 by Dylan Hall

Japanese robot to look after elderly

March 16th, 2006 by Dylan Hall

Tearing up the Credit Card Fraud!

March 16th, 2006 by Dylan Hall