Results 1 to 2 of 2

Thread: Controlling table spacing/padding in rows and columns

  1. #1
    Join Date
    Aug 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Controlling table spacing/padding in rows and columns

    So I have a really, really annoying issue. When my table loads on my webpage, the table looks the way I want it to with consistent padding throughout. I used the cellpadding and cellspacing as well to make sure the table behaves as I want it to.

    However, when I load it on Firefox, the spacing between rows is larger. It doesn't do this for any other browser except firefox. Each cell has just a single image in them, but I noticed that when I assign a link to the image, the spacing under that cell increases.

    It seems like I have to override something the browser is doing, but I tried to use cellpadding and cellspacing and it isn't working. What should I do?

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,038
    Thanks
    16
    Thanked 316 Times in 314 Posts
    Blog Entries
    13

    Default

    You could try zeroing the padding and margin on the images and anchor tags in your table.

    Something like this in your CSS/stylesheet.

    Code:
    <style type="text/css">
    td img, td a { margin:0; padding:0 }
    </style>
    Check your other CSS too - there may be something else that's adding margins/padding that you've not accounted for.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •