No replies
TJTojo
TJTojo's picture
Offline
newbie
Last seen: 9 years 13 weeks ago
Timezone: GMT+2
Joined: 2013-01-11
Posts: 9
Points: 16

Hello!

I have this styling for a table marked with Start style 1 further down.
I now want this to be only for this table

that have an id vivaGrid .

I have come up with this but wonder if I can extract the th and td because both
use padding: 0.5em 1em;

#vivaGrid table
{
width : 100%;
}

#vivaGrid tr:nth-child(even)
{
background: #eee;
}

#vivaGrid th
{
font-weight: bolder;
text-align : left;
padding: 0.5em 1em;
}

#vivaGrid td
{
padding: 0.5em 1em;
}

Start style 1
*************
table
{
width: 100%;
}
tr:nth-child(even)
{
background: #eee;
}
th
{
font-weight: bolder;
text-align: left;
}
th, td
{
padding: 0.5em 1em;
}

//Tony