css - Can't set header background of a table the way I want -
i’m trying adapt css code found, table seems ugly (according me). i'll explain on picture.
css:
td, th { border-left: 1px solid #494437; border-top: 1px solid #494437; padding: 10px; text-align: left; } th { background-color: #b8ae9c; -webkit-box-shadow: inset 2px 2px 0px 0px rgba(255,255,255,1); -moz-box-shadow: inset 2px 2px 0px 0px rgba(255,255,255,1); box-shadow: inset 2px 2px 0px 0px rgba(255,255,255,1); border-top: none; text-shadow: 0 1px 0 rgba(255,255,255,.5); } td:first-child, th:first-child { border-left: none; }
i explained want image:
edit: example expect white area on right side, when add padding-right: 0.2em; "th". doesn't change anything.
is expecting?
.table { border: 1px solid #000; float: left; } .header { border: 2px solid #ccc; border-width: 2px 0 0 2px; background-color: #b8ae9c; margin: 2px; float: left; }
<div class="table"> <div class="header">header</div> <div class="header">header</div> </div>
Comments
Post a Comment