Support » Fixing WordPress » Reduce padding inside WP tables

  • Resolved LRigel


    Hey, First time poster. Using the Asteroid theme. Real simple issue – how do I reduce upper/lower padding inside tables? I’m local, so here’s a screen –

    So again, I would like to reduce inside table padding and the space between lines of text (if possible) so I don’t waste very much space.
    Reducing table height does not seem to work. Here is a sample code of my tables, inside a div

    <div style="float: right; margin: 0 1px 1px 0;">
    <table width="320" cellspacing="0" cellpadding="0">
    <tr style="background-color: #404040;">
    <td style="text-align: center;"><span style="color: #ffffff;">Table Title</span></td>
    <td><span style="font-size: 11px;">Text with lower table height

Viewing 3 replies - 1 through 3 (of 3 total)
  • Unfortunately, it’s very hard to help with CSS issues without seeing a live page. Try using Firebug (or other browser tool) to work with CSS issues like this. This may also be helpful:

    BTW, you also should only use tables for data – not layouts and all CSS should be in an external stylesheet – not in the HTML code…

    Thanks. Basically I’m looking a way to override the default cellspacing/cellpadding values. I guess I’ll look into it some more. I didn’t think it would be a problem mixing HTML and CSS (I thought that since WP supports both of them, why not mess around).

    In the end I’ve figured it out. Apparently, it had nothing to do with my table.

    I added <div style="line-height: 1.0em;"> to my container div, which I also listed in my original post. It lowered the space between text lines. So the div containing all of my tables now looks like this-

    <div style="line-height: 1.0em; float: right; margin: 2px 2px 2px 2px;">

    It seemed to have fixed the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Reduce padding inside WP tables’ is closed to new replies.