Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5

Thread: Table CSS

  1. #1
    Member
    Join Date
    Jun 2013
    Posts
    38
    Member #
    36453
    Liked
    1 times

    Table CSS

    I downloaded a template from the internet, and my tables don't have any borders or padding between the <td>'s. I'm a real noob to CSS so I was hoping someone could help me change it. It looks to me like there is padding and borders from the CSS, but there is none on the website.



    table
    {
    width: 100%;
    }

    table.style1
    {
    width: 100%;
    }

    table.style1 tbody tr
    {
    border-top: solid 1px #E5E5E5;
    }

    table.style1 tbody tr:first-child
    {
    border-top: 0;
    }

    table.style1 td
    {
    padding: 0.75em 1em 0.75em 1em;
    }

    table.style1 th
    {
    text-align: left;
    font-weight: bold;
    padding: 0.75em 1em 0.75em 1em;
    }

    table.style1 thead
    {
    background: #878787;
    color: #fff;
    font-weight: 400;
    text-transform: uppercase;
    border: 0;
    box-shadow: 0.125em 0.175em 0 0 rgba(0,0,0,0.125);
    }

    table.style1 tfoot
    {
    background: #F0F0F0;
    border-top: solid 2px #E5E5E5;
    }

    table.style1 tbody
    {
    }

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Borders only work on table cells (meaning td and th tags). So that's half of it.

    As far as why your padding wouldn't work, I can't see why I wouldn't. Maybe it's just not obvious. Try putting a ridiculous amount of padding on one of the dimensions (say 5000 pixels) and see if that shows up. If it doesn't, then you probably don't have a class defined for whatever table you're looking at.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Member
    Join Date
    Jun 2013
    Posts
    38
    Member #
    36453
    Liked
    1 times
    I've just been making basic tables. Is there something more you're saying I need to do? What class should I give it?

    <table>
    <tr>
    <td>1</td>
    <td>2</td>
    </tr>
    </table>

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    style1. That would match the CSS rules you're providing.

    Alternatively, you can remove .style1 from the CSS rules.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Member
    Join Date
    Jun 2013
    Posts
    38
    Member #
    36453
    Liked
    1 times
    Thank you. That works great


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:37 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com