How to access with CSS first row of the table with different tr class name.
Date | Solution 1:
#right.headtd:first-child{
border-top-left-radius: 10px;
}
#right.headtd:last-child {
border-top-right-radius: 10px;
}
Solution 2:
You can take it further by doing.
#righttr:first-child td:first-child {
background-color: red;
}
Selecting the first tr and then the first td.
Solution 3:
use pseudo class :first-child
to get the first element.
Like:
#right.headtd:first-child {
border-top-left-radius: 10px;
}
#right.headtd:last-child {
border-top-right-radius: 10px;
}
Solution 4:
#righttabletr.headtd:first-child {
border-top-left-radius: 10px;
}
#righttabletr.headtd:last-child {
border-top-right-radius: 10px;
}
Post a Comment for "Set Css Style Only To First Row Of The Table"