W3C home > Mailing lists > Public > www-html@w3.org > July 2001

Re: Table Border Using CSS

From: Kim M <rllrgrrl@hotmail.com>
Date: Mon, 02 Jul 2001 12:06:37 +1000
To: paulbonugli@hotmail.com
Cc: www-html@w3.org
Message-ID: <F179gddu5qE8DzHx63R000151b1@hotmail.com>
there are several ways

1.  table   { border:1px solid red; } doesn't work in netscape4

2.  <div style="border:1px solid red;">
        <table border="0">
            <tr><td>stuff</td></tr>
        </table>
    </div>
    technically should work in netscape 4 but these things can be quirky

3.  <table cellpadding="1" cellspacing="0" style="background-color:red">
        <tr><td>
            <table cellspacing="0" border="0" style="background-color:red">
                <tr><td>stuff</td></tr>
            </table>
        </td></tr>
    </table>

the cellpadding of the outer tabe determines the width of the outer border. 
cellspacing of the inner table determines if there are internal borders (and 
adds to the external border) this works in netscape4) I always put the 
actual style bits into an external css though of course.

Kim




>From: "Paul Bonugli" <paulbonugli@hotmail.com>
>To: www-html@w3.org
>Subject: Table Border Using CSS
>Date: Fri, 29 Jun 2001 09:29:50 +0100
>
>Hi Everybody!
>
>Does anybody know a way of using CSS to create a coloured border AROUND A
>TABLE. I know that you can somehow put this around a paragraph, but I'm not
>sure how you could use CSS to specify a table border colour. At present I 
>am
>using the "bordercolor" table attribute, but since this is not an official
>part of HTML, it only works on Internet Explorer, and since the rest of the
>site is now using CSS I would like to convert this too.
>
>Maybe there are other ways of doing this using HTML? (but I would rather 
>not
>create 1px images to stretch out, unless I absollutely have to)
>
>Any help will be gratefully received!
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Received on Sunday, 1 July 2001 22:07:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:48 GMT