SitePoint Sponsor |
|
User Tag List
Results 1 to 14 of 14
Thread: bordercolor
-
Nov 9, 2003, 09:31 #1
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
bordercolor
How can I give a specific cell in a table a bordercolor?
-
Nov 9, 2003, 09:32 #2
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
HTML Code:<table border="1"> <tr><td style="border: 1px solid red">Text</td></tr> </table>
DouglasHello World
-
Nov 9, 2003, 10:22 #3
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ok
so I have to make the border of all the other cells white.
-
Nov 9, 2003, 10:32 #4
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Rodney
Code:td { border: 1px solid white; } .red { border-color: red; }
HTML Code:<table border="1"> <tr><td class="red">Red</td><td>Text</td></tr> <tr><td>Text</td><td>Text</td></tr> </table>
DouglasHello World
-
Nov 9, 2003, 10:46 #5
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can I put the color also in #...... ?
-
Nov 9, 2003, 11:08 #6
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Guess.
No, really, give it a try yourself. Does it work?
DouglasHello World
-
Nov 9, 2003, 12:23 #7
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No, it doesn't.
-
Nov 9, 2003, 12:30 #8
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How about rgb colours? Do they work?
Code:.red { border-color: rgb(255,0,0); }
Sorry for being an a-ss about it, but really.... (a-ss is a censored word????? I know this is an international forum and all... but a-ss? It means donkey!)Hello World
-
Nov 9, 2003, 14:41 #9
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm sorry for not being clear.
The # is working.
The problems come when I add class=".." to the "<td>".
That seems to block the cell. And don't changes the bordercolor.
-
Nov 9, 2003, 14:55 #10
# in a stylesheet denotes an ID not a class. If your stylesheet has #whatever in it, your table cell has to have an id of "whatever".
-
Nov 9, 2003, 14:59 #11
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I tested the example and that seems to work.
I'm obviously doing something wrong.
-
Nov 9, 2003, 15:00 #12
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So I can't use the #..... .
I'll try the RGB code.
-
Nov 9, 2003, 15:12 #13
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Rodney: # can be used in more than one place in a CSS file.
This is a colour, and this is an id selector:
Code:#redcell { border-color: #f00; }
HTML Code:<td id="redcell">red</td>
DouglasHello World
-
Nov 9, 2003, 15:21 #14
- Join Date
- Sep 2003
- Location
- rotterdam
- Posts
- 91
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's working now.
Thanx for the help and the patience.
Bookmarks