<col> CSS element border not working

I use to apply borders only to certain columns, it does not work for me at all.

other properties work as background color.

Doesn't the browser support a column border on tables?

here is my code

<style type="text/css"> .check_border { border-right: 1px solid black; background-color: #0000ff; } </style> <table cellspacing='0'> <colgroup> <col/> <col class="check_border"/> <col class="check_border"/> <col class="check_border"/> <col/> </colgroup> <tr> <td>Country</td> <td>Salmon</td> <td>Shrimps</td> <td>Oysters</td> <td>Rice</td> <td>Wheat</td> </tr> <tr> <td>United Kingdom</td> <td>2050</td> <td>1545</td> <td>1156</td> <td>5007</td> <td>12254</td> </tr> <tr> <td>United States</td> <td>1358</td> <td>1884</td> <td>784</td> <td>10597</td> <td>24554</td> </tr> <tr> <td>Australia</td> <td>985</td> <td>65</td> <td>518</td> <td>2548</td> <td>10548</td> </tr> </table> 
+4
source share
1 answer

PPC has a good article about all this. The summary of this is that the a col style has been slightly changed in browser support and is very unpleasant in the application.

http://www.quirksmode.org/css/columns.html

+4
source

Source: https://habr.com/ru/post/1411075/


All Articles