Cell Spacing Issue

Discussion in 'CSS' started by pchieng, May 9, 2009.

  1. #1
    I have two buttons that need more spacing between the two, but I don't know what to do.

    Here is the site:
    http://www.frugalshoppingideas.com/

    I want to make it so that the "Subscribe to Me!" and "Subscribe via Email" are all on one line. I tried to increase the width of the cells, but can't get it to work.

    Here is the code:

    <table>
    <tr>
    <td><a href="http://feeds2.feedburner.com/FrugalShoppingIdeas"><img src="http://www.frugalshoppingideas.com/wp-content/uploads/2009/05/rss-button.jpg" alt="Subscribe via RSS Feed" title="Subscribe via RSS Feed" /></a></td>
    <td><a href="http://feedburner.google.com/fb/a/mailverify?uri=FrugalShoppingIdeas&amp;loc=en_US"><img src="http://www.frugalshoppingideas.com/wp-content/uploads/2009/05/email-subscription.jpg" alt="Subscribe via Email" title="Subscribe via Email" /></a></td>
    </tr>
    <tr>
    <td class="padd"><b><a class="sub1" href="http://feeds2.feedburner.com/FrugalShoppingIdeas">Subscribe to Me!</a></b></td>
    <td class="padd"><b><a class="sub1" href="http://feedburner.google.com/fb/a/mailverify?uri=FrugalShoppingIdeas&amp;loc=en_US">Subscribe via Email!</a></b></td>
    </tr>
    </table>

    Here is the CSS:

    td.padd {
    width: 20px;
    }

    What am I doing wrong, or what can I do to help make this happen??


    Thanks!!
     
    pchieng, May 9, 2009 IP
  2. Satovo

    Satovo Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try to add padding.

    Something like:

    padding: 0 20px 0 20px 0;
     
    Satovo, May 9, 2009 IP
  3. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #3
    It's not the padding.

    To tell you the truth, I am confused as to what the problem is. The table should expand to let the text appear on a single line. It'll do this as long as you haven't defined a specific width, and as long as there's enough room. But it's not expanding for some reason. You must have something in your CSS which is preventing the table from doing so.

    Try increasing the width of the table with local styling. This'll override the external style sheet.

    Add width="200px" to your table element, like this:

    <table width="200px">

    This'll force the table open.

    Change the width to whatever you want. Make it a percentage if you want the table to be fluid.
     
    Masterful, May 9, 2009 IP
  4. Mello

    Mello Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <table id="feed" cellspacing="0" cellpadding="0">
    <tr>
    <td><a href="http://feeds2.feedburner.com/FrugalShoppingIdeas"><img src="http://www.frugalshoppingideas.com/wp-content/uploads/2009/05/rss-button.jpg" alt="Subscribe via RSS Feed" title="Subscribe via RSS Feed" /></a></td>
    <td><a href="http://feedburner.google.com/fb/a/mailverify?uri=FrugalShoppingIdeas&amp;loc=en_US"><img src="http://www.frugalshoppingideas.com/wp-content/uploads/2009/05/email-subscription.jpg" alt="Subscribe via Email" title="Subscribe via Email" /></a></td>
    </tr>
    <tr>
    <td><b><a class="sub1" href="http://feeds2.feedburner.com/FrugalShoppingIdeas">Subscribe to Me!</a></b></td>
    <td><b><a class="sub1" href="http://feedburner.google.com/fb/a/mailverify?uri=FrugalShoppingIdeas&amp;loc=en_US">Subscribe via Email!</a></b></td>
    </tr>
    </table>
    
    HTML:
    Here is the CSS:
    
    table#feed {
    width:280px;
    }
    
    #feed td {
    width: 140px;
    text-align:center;
    }
    
    Code (markup):

    Just modify this two numbers and it will be good
    please add those at the end of the style sheet
    cause u already got this attributes out there
    #sidebars table{width:130px;
    }
    
    Code (markup):
     
    Mello, May 10, 2009 IP