Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get table-row css and border property work together?

Tags:

html

css

I have this CSS:

#center{
    display:table-row;
    border:solid #55A 1px;
    background-color:#AAF;
    height:100%;
}

Actually, the border property is just ignored. Why? How can I Fix it?
DEMO
Thanks

like image 676
ilyes kooli Avatar asked Jun 04 '12 15:06

ilyes kooli


People also ask

How can we apply borders to table rows?

You can use the box-shadow property to fake a border of a tr element. Adjust Y position of box-shadow (below represented as 2px) to adjust thickness. Voting is disabled while the site is in read-only mode. Voting is disabled while the site is in read-only mode.

How do you put a border on a row in CSS?

Solution with the CSS border-bottom property If you want to add a border only to the bottom of the table row, you can apply the CSS border-bottom property to <td> elements that are placed within a <tr> tag.

How do you give border radius to a table tr?

To add border radius to a table row tr , you have to specifically target the first table data td on the row and the last. This Pen is owned by Temitope Ayodele on CodePen.


1 Answers

Table rows can't have borders. Cells within a table row can, but the row itself cannot.

like image 50
Niet the Dark Absol Avatar answered Oct 08 '22 10:10

Niet the Dark Absol