473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Tables, bordercolor and CSS

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
8 13078
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
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
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
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
"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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hostile17 | last post by:
I've been trying to figure out a good way to make a CSS layout with nice-looking 1-pixel borders around the table cells. The only broadly compatible way to do this I know of is to have * the...
0
by: Torbjørn Pettersen | last post by:
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...
0
by: Chef Blair | last post by:
I want to use CSS to control the color and borders on all the tables in my site, so I can just modify the CSS file, to control the behavior of the tables. Problem Is: Using CSS I cant seem to...
1
by: LastOfEight | last post by:
I'm trying to hide tables in the code below, but it is not working. Could someone take a look at my code? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">...
6
by: luvdairish | last post by:
I tried posting a few times, but it hasn't shown up. Hope this one works. Problem: Having trouble hiding tables when page is loaded. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0...
3
by: Mark Rae | last post by:
Hi, Is there any way to put a border round several rows in a standard HTML table by surrounding them with an asp:Panel (or a client-side <div>)? When I try, the border doesn't appear, though it...
2
by: Jeff S | last post by:
Hello I am having an issue with changing the bordercolor of the panel control I have got to a point where I have created my own control and inherited the Panel control, then in the Overrides Sub...
22
by: Alan Silver | last post by:
Hello, I am updating some old web pages, and have come across a problem. I have some tables where the opening tag looks like... <table border="1" bordercolor="#ffffff"> which gives a nice...
4
by: ehime | last post by:
...for noncompliant browsers (Opera/Mozilla). I have been trying to get a little hack together for class, and am simply overwhelmed by lack of browser support. Here's what I started with. ...
3
by: rn5a | last post by:
How do I change the BorderColor of the rows under the 2nd column in a DetailsView? I could change the BorderColor of the 1st column using the FieldHeaderStyle-BorderColor property but using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.