Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Posts
    186
    Thanks
    21
    Thanked 6 Times in 6 Posts

    Default Table Border With CSS?

    Hi,

    Is there a way I can get that default ugly table border with css? The border style I'm talking about would be when you simply do table border="1".

    Thanks.
    Last edited by PeaTearGriffin; 03-13-2009 at 09:52 PM.

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Try this:
    Code:
    border: medium inset #fff;
    Or this:
    Code:
    border: medium outset #fff;
    Is one of these what you are after?
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #3
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    More to the point, you're probably wanting something like this:
    Code:
    <html>
    <head>
    <style type="text/css">
    td, tr 
    {
    border: 1px inset #e2e2e2
    }
    table
    {
    border: 1px outset #fff
    }
    </style>
    </head>
    
    <body>
    <table>
    <tr>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    </tr>
    <tr>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    </tr>
    <tr>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    <td>
    Some text
    </td>
    </tr>
    </table>
    </body>
    </html>
    Last edited by Rowsdower!; 03-13-2009 at 08:48 PM.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #4
    Regular Coder
    Join Date
    Apr 2006
    Posts
    186
    Thanks
    21
    Thanked 6 Times in 6 Posts
    Haven't heard of inset/outset before. :P It works perfect, thanks!


  •  

    Posting Permissions

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