![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
If I do: table border="1" I get a border. I have three of four different tables. I would like to set them up without border="1": table and use css to turn the border on or off. Is it possible? |
#3
| |||
| |||
|
|
In article <h2jr7r$6kj$1 (AT) aioe (DOT) org>, Gianni <gianni (AT) gianni (DOT) com> wrote: If I do: table border="1" I get a border. I have three of four different tables. I would like to set them up without border="1": table and use css to turn the border on or off. Is it possible? Yes. table class="bestBuys" table class="planets" table class="topEconomies" and in the CSS, one way to target the ones that you want a border for might be: .planets {border: 1px solid #000} The others will be borderless by default. If you want the cells themselves to have borders, one way is no border to table itself but: table {border-collapse: collapse} td {border: 1px solid #000;} Thank you. |
#4
| |||
| |||
|
|
table border="1" - - .planets {border: 1px solid #000} |
|
If you want the cells themselves to have borders, one way is no border to table itself but: table {border-collapse: collapse} td {border: 1px solid #000;} |
#5
| |||
| |||
|
|
dorayme wrote: table border="1" - - .planets {border: 1px solid #000} That sets a border around the whole table only, which is different from the effect of the HTML attribute. If you want the cells themselves to have borders, one way is no border to table itself but: table {border-collapse: collapse} td {border: 1px solid #000;} This generates yet another type of bordering. Quite possibly better than the HTML way, but nominally the OP asked for a replacement of <table border="1">. There is no replacement, as the effect of the HTML construct depends on the browser in a manner that cannot (and probably need not) be reproduced in CSS. |
#6
| |||
| |||
|
|
What can you do with the border attribute that you can't do with CSS? |
#7
| |||
| |||
|
|
Ben C wrote: What can you do with the border attribute that you can't do with CSS? What I said - generate borders in browser-dependent, undocumented manner. I think Yukka must be working from an undisclosed location. When do |
#8
| |||
| |||
|
|
I think Yukka must be working from an undisclosed location. |
|
When do we get to see the undocumented behaviour of <table border="1"> ? |
#9
| |||
| |||
|
|
Biff wrote: I think Yukka must be working from an undisclosed location. Try using my real name or my nickname, not a spelling you invented, and maybe I'll stop calling you Biff. |
|
When do we get to see the undocumented behaviour of <table border="1"> ? As soon as you bother testing the effect of that construct on some browsers, I guess. |
#10
| |||
| |||
|
|
Jukka K. Korpela wrote: Biff wrote: I think Yukka must be working from an undisclosed location. Try using my real name or my nickname, not a spelling you invented, and maybe I'll stop calling you Biff. Maybe you should look at your own sig line: Yucca, http://www.cs.tut.fi/~jkorpela/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |