Firefox’s 1 pixel indent on the caption tag

In: Css|html

9 Sep 2008

I was making a table that has a <caption> tag on it and I noticed that in Firefox there was a 1 pixel indent on the left side of the Caption and in Safari (Ver - 3.1.2) there is a 1 pixel right indent.

I could not figure out why that was until I found this "Styling Table Captions". This page is outdated but has some useful information.

You would think that the basic fix for Firefox and safari would be this:

caption {
    margin-left:-1px;
  }
 

This only fixes Firefox and not the issues with Safari or Google Chrome.
I guess My immediate fix for this is to add a <td> with colspan and a class called caption.

Anyone has any Ideas how to fix this?

Update

Some more information on styling captions on tables.

This page has the fix for Firefox and some versions of Opera. Warning the fix does contain a hack.

Styling table captions with CSS: fixing the width problem

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit
  • Technorati

Comment Form

About this blog

Just another Css,Javascript, Web Design Blog.

  • Roberto: Hi Graham. I have added CSS web to the list [...]
  • Roberto: http://cssgallery.com/ has been added. Thanks for your submission [...]
  • CSS Gallery: Great collection of inspirational resources. We did notice you didn’t include http://cssgallery.co [...]
  • Graham: Please also add CSS Web [...]
  • Victor Conesa: Thanks for including http://www.justinmind.com in your list. We have currently launched and update w [...]

What I'm Doing...

Powered by Twitter Tools

Foundation Beyond Belief

Polls

What wireframing software do you use?

View Results

Loading ... Loading ...

Calendar

September 2008
M T W T F S S
« Jul   Nov »
1234567
891011121314
15161718192021
22232425262728
2930