By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,226 Members | 1,415 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,226 IT Pros & Developers. It's quick & easy.

Tables, bordercolor and CSS

P: n/a
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS. The W3.com's validator tells me
that bordercolor isn't valid any more, so I have to push it into
the CSS, but how do I do this? I am, by the way, using
DreamWeaver as my main design tool.

--
Torbjørn Pettersen
Editor/Webmaster
FantaFiction

www.fantafiction.com
Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
I wrote...
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS. The W3.com's validator tells me
that bordercolor isn't valid any more, so I have to push it into
the CSS, but how do I do this? I am, by the way, using
DreamWeaver as my main design tool.


<foolish grin>
OK, I found the solution. Was actually pretty simple.

Used this in the CSS file:
..myTable {

padding: 0;
margin: 0;
border-width: 1;
border-color: #996600;
border-style: solid;
}

And this in the HTML (ASP) file:
..table class="myTable"
</foolish grin>

It's incredible what Google can find for you when you use the right
search phrase. ;-)

--
Torbjørn Pettersen
Editor/Webmaster
FantaFiction

www.fantafiction.com
Jul 20 '05 #2

P: n/a
I wrote...
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS. The W3.com's validator tells me
that bordercolor isn't valid any more, so I have to push it into
the CSS, but how do I do this? I am, by the way, using
DreamWeaver as my main design tool.


<foolish grin>
OK, I found the solution. Was actually pretty simple.

Used this in the CSS file:
..myTable {

padding: 0;
margin: 0;
border-width: 1;
border-color: #996600;
border-style: solid;
}

And this in the HTML (ASP) file:
..table class="myTable"
</foolish grin>

It's incredible what Google can find for you when you use the right
search phrase. ;-)

--
Torbjørn Pettersen
Editor/Webmaster
FantaFiction

www.fantafiction.com
Jul 20 '05 #3

P: n/a
in post: <news:40********@news.broadpark.no>
"Torbjørn Pettersen" <tpe AT broadpark DOT no> said:
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS.
#blah{border:1px dotted green;}

<table id="blah">
The W3.com's validator tells me that bordercolor isn't valid any more,


it never was valid

--
b r u c i e
Jul 20 '05 #4

P: n/a
in post: <news:40********@news.broadpark.no>
"Torbjørn Pettersen" <tpe AT broadpark DOT no> said:
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS.
#blah{border:1px dotted green;}

<table id="blah">
The W3.com's validator tells me that bordercolor isn't valid any more,


it never was valid

--
b r u c i e
Jul 20 '05 #5

P: n/a
"Torbjørn Pettersen" <tp*@broadpark.no> wrote:
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS.
Same as any other element, but be aware that whilst the border
attribute of <table> in HTML affects both the table and its
constituent cells the border property in CSS can affect table and
cells separately.
The W3.com's validator tells me that bordercolor isn't valid any more,
It never was.
so I have to push it into the CSS, but how do I do this?


table {
border-color: #FF0000;
}

td, th {
border-color: #0000FF;
}

Give red borders around the table and blue borders around the
individual cells. Set border-width, border-style, border-collapse and
border-spacing as well for more options.

See http://www.w3.org/TR/CSS21/box.html#border-properties

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #6

P: n/a
"Torbjørn Pettersen" <tp*@broadpark.no> wrote:
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS.
Same as any other element, but be aware that whilst the border
attribute of <table> in HTML affects both the table and its
constituent cells the border property in CSS can affect table and
cells separately.
The W3.com's validator tells me that bordercolor isn't valid any more,
It never was.
so I have to push it into the CSS, but how do I do this?


table {
border-color: #FF0000;
}

td, th {
border-color: #0000FF;
}

Give red borders around the table and blue borders around the
individual cells. Set border-width, border-style, border-collapse and
border-spacing as well for more options.

See http://www.w3.org/TR/CSS21/box.html#border-properties

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #7

P: n/a
Try this:
table {
border: 1px solid #99660;
border-collapse: collapse;
padding: 2px;
margin-top: 0.5em;
margin-bottom: 0;
}
"Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message news:<40********@news.broadpark.no>...
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS. The W3.com's validator tells me
that bordercolor isn't valid any more, so I have to push it into
the CSS, but how do I do this? I am, by the way, using
DreamWeaver as my main design tool.

Jul 20 '05 #8

P: n/a
Try this:
table {
border: 1px solid #99660;
border-collapse: collapse;
padding: 2px;
margin-top: 0.5em;
margin-bottom: 0;
}
"Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message news:<40********@news.broadpark.no>...
I have two tables, and I want one of them to use bordercolor.
How can I do this with CSS. The W3.com's validator tells me
that bordercolor isn't valid any more, so I have to push it into
the CSS, but how do I do this? I am, by the way, using
DreamWeaver as my main design tool.

Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.