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 5 of 5

Thread: Table borders

  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table borders

    Can someone please tell me how to get a table border to work in other browsers then IE. I know you can do it in CSS, can someone please tell me how and I what the whole table to have a border (the cells inside), not just the outside.

    Regards, Jason

  • #2
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    place this into the <table> tag.

    border="1" bordercolor="#000000"
    Omnis mico antequam dominus Spookster!

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is the CSS way...

    <html>
    <head>
    <title>Untitled</title>
    <style type="text/css">
    <!--
    .topleft, .topcenter, .topright, .centerleft, .centercenter, .centerright {
    border-top:1px solid #000;
    }
    .topcenter, .topright, .centercenter, .centerright, .bottomcenter, .bottomright {
    border-right:1px solid #000;
    }
    .centerleft, .centercenter, .centerright, .bottomleft, .bottomcenter, .bottomright {
    border-bottom:1px solid #000;
    }
    .topleft, .topcenter, .centerleft, .centercenter, .bottomleft, .bottomcenter {
    border-left:1px solid #000;
    }
    -->
    </style>
    </head>
    <body>
    <table cellspacing="0" cellpadding="0">
    <tr>
    <td class="topleft">xxx</td>
    <td class="topcenter">xxx</td>
    <td class="topright">xxx</td></tr>
    <td class="centerleft">xxx</td>
    <td class="centercenter">xxx</td>
    <td class="centerright">xxx</td></tr>
    <tr>
    <td class="bottomleft">xxx</td>
    <td class="bottomcenter">xxx</td>
    <td class="bottomright">xxx</td></tr>
    </table>
    </body>
    </html>

  • #4
    New Coder
    Join Date
    Aug 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Mhtml
    place this into the <table> tag.

    border="1" bordercolor="#000000"
    This will only work in IE not Netscape, Opera etc

    Thanks anyway

    Thanks MCookie that what I needed

  • #5
    New to the CF scene
    Join Date
    Oct 2002
    Location
    Romania
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello.
    Try this... using spacing between cells.

    <TABLE width=304 cellspacing=0 cellpadding=0 border=0>
    <TR>
    <TD valign=top bgcolor="#000000">
    <TABLE width=304 cellspacing=1 cellpadding=0 border=0>
    <TR>
    <TD width=100 valign=top bgcolor="#FFFFFF" rowspan=2>cell 1</TD>
    <TD width=100 valign=top bgcolor="#FFFFFF">cell 2</TD>
    <TD width=100 valign=top bgcolor="#FFFFFF">cell 3</TD>
    </TR>
    <TR>
    <TD width=100 valign=top bgcolor="#FFFFFF">cell 4</TD>
    <TD width=100 valign=top bgcolor="#FFFFFF">cell 5</TD>
    </TR>
    <TR>
    <TD width=200 valign=top bgcolor="#FFFFFF" colspan=2>cell 6</TD>
    <TD width=100 valign=top bgcolor="#FFFFFF">cell 7</TD>
    </TR>
    </TABLE>
    </TD>
    </TR>
    </TABLE>

    Also, there are other ways for 1px borders, like building 1px width cells with background color.

    Hope this helps.
    Mihaela.


  •  

    Posting Permissions

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