html - Border in the middle first child td -
how set border in middle (first-child)?
like this:
1 | 2 | 3
code:
.table { width:50%; } .table table{ border-collapse: collapse; width:100%; height:100%; } .table td{ color: #000000; font-size: 12px; line-height: 16px; margin-bottom: 6px; font-family: arial,helvetica,sans-serif; } .table tr:nth-child(odd) { background-color:#efefef; } .table tr:nth-child(even) { background-color:#ffffff; } .table tr:first-child td{ background-color:#efefef; text-align:left; color:#868686; font-size: 12px; font-family: arial,helvetica,sans-serif; line-height: 16px; margin-bottom: 6px; }
i hope help, in advance.
you can use :not()
selector first/last td
border-left/right
css property:
.table tr:first-child td:not(:last-child) { border-right: 1px solid black}
Comments
Post a Comment