Mykroft Mykroft - 8 months ago 26
CSS Question

How do I put a border around a tr tag?

I have a very simple html page:


With some simple css:

border:1px solid blue;

I would expect this to put a border around the trs but it doesn't put a border around it at all. How do i get a border around the tr?


Add table { border-collapse: collapse; }.

From the CSS2 specification:

In [the border-collapse: separate model], each cell has an individual border. [...] Rows, columns, row groups, and column groups cannot have borders (i.e., user agents must ignore the border properties for those elements).