EDIT: I ended up switching to an ul/li list. But I am still wondering, there should be a solution possible with tables as well.
I've got a html table set up with borders on it's TD elements. Displays perfect in modern browsers. But, although it can be debated, I wan't to support IE8 as much as possible.
Frankly, IE8 is doing weird stuff with the borders of the table. I've looked at a lot of questions asked down here but none of which i've found yield the answer to my situation.
The table should have borders on all sides of it's TD elements. IE8 only renders the left and buttom border. As you can see on the screenshot below. The code is found under the image. I can't find the solution, hope some of you got any idea.
Thanks so much for any thoughts!
Link: Working example
The CSS Code:
.pricing-table{
border-collapse:collapse;
margin:20px;
padding:20px;
}
.pricing-table td {
width: 210px;
padding: 10px 0px;
border-top:1px solid #FFFFFF;
border-bottom:1px solid #e9e9e9;
border-left:1px solid #cdcdcd;
border-right:1px solid #cdcdcd;
font-size: 14px;
font-weight:bold;
line-height: 35px;
color: #555;
text-shadow: 0 1px 0 #fff;
background: -webkit-gradient(linear, left top, left bottom, from(rgb(250, 250, 250)), to(rgb(237, 237, 237)));
background: -webkit-linear-gradient(top, rgb(250, 250, 250), rgb(237, 237, 237));
background: -moz-linear-gradient(top, rgb(250, 250, 250), rgb(237, 237, 237));
background: -o-linear-gradient(top, rgb(250, 250, 250), rgb(237, 237, 237));
background: -ms-linear-gradient(top, rgb(250, 250, 250), rgb(237, 237, 237));
background: linear-gradient(top, rgb(250, 250, 250), rgb(237, 237, 237));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#fafafa', EndColorStr='#ededed'); /*IE6 & IE7 gradient*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#fafafa', endColorstr='#ededed')"; /*IE8 gradient*/
}
.pricing-table td span.icon-accept-16x16{
display:inline-block;
width:16px;
height:16px;
margin:0 10px;
background: url(img/icon-accept-16x16.png);
}
.pricing-table td.orange{
background:#ee5420;
filter:none;/*Fallback: IE 8 and below*/
font: 'Open Sans', sans-serif;
font-weight:600;
border-bottom:1px solid #b73f16;
border-top:1px solid #cdcdcd;
border-left:1px solid #ee5420;
border-right:1px solid #ee5420;
}
.pricing-table td.orange h2{
margin:0;
padding:0 0 0 36px;
font-size: 20px;
font-weight:600;
color:#FFF;
text-shadow: 0 1px 2px rgba(0,0,0,0.4);
line-height:40px;
}
/* Table Head */
.pricing-table thead td.orange {
border:none;/*Not ideal, try ti find a fix*/
-webkit-top-left-border-radius: 5px;
-moz-border-top-left-radius: 5px;
border-top-left-radius: 5px;
-webkit-top-right-border-radius: 5px;
-moz-border-top-right-radius: 5px;
border-top-right-radius: 5px;
}
/* Footer */
.pricing-table tfoot td {
width: 190px;
padding: 20px 10px;
text-align: center;
line-height: 18px;
background: #ffffff;
filter:none;
font-size: 11px;
font-weight:normal;
color: #828282;
-webkit-border-radius: 0 0 2px 2px;
-moz-border-radius: 0 0 2px 2px;
border-radius: 0 0 2px 2px;
-webkit-box-shadow: 0px 2px 0px #e4e4e4;
-moz-box-shadow: 0px 2px 0px #e4e4e4;
box-shadow: 0px 2px 0px #e4e4e4;
}
And here's the HTML:
<table class="pricing-table" >
<thead>
<tr>
<td class="orange">
<h2>Voor leerlingen</h2>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>Online topotrainer</td>
</tr>
<tr>
<td>Topografieboekje</td>
</tr>
<tr>
<td>Jouw resultaten</td>
</tr>
<tr>
<td class="orange">
<h2>Voor docenten</h2>
</td>
</tr>
<tr>
<td>Toetsen genereren</td>
</tr>
<tr>
<td>Leerlingen volgen</td>
</tr>
<tr>
<td>Boekjes bestellen</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Topografie in de Klas is een 100% gratis lesmethode voor Topografie in het onderwijs. </td>
</tr>
</tfoot>
</table>
Related
I'm sorry if the title make you confused, I wonder my table border suddenly lost it color
#my-table table {
font-family: "Nunito", sans-serif;
font-size: 18px;
color: #1d3962;
margin: 0% auto;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
max-width: 1200px;
border: none;
border-top: none;
}
#my-table tr{
border-top: solid 2px rgba(58, 115, 197, 0.1);
}
#my-table tr:nth-child(1){
border-top: none;
}
#my-table tr:nth-last-child(1){
border-bottom: none;
}
#my-table td{
width: 25%;
}
#my-table .first{
border-top: solid 2px rgba(58, 115, 197, 0.4);
}
#my-table tr td:nth-child(1){
padding: 0px 0px;
}
#my-table tr th:nth-child(2){
font-weight: bold;
background-color: rgba(46, 207, 47, 0.1);
border-top-right-radius: 20px;
border-top-left-radius: 20px;
padding: 32px 38px;
}
#my-table tr td:nth-child(2){
background-color: rgba(46, 207, 47, 0.1);
padding: 32px 38px;
}
#my-table tr th:nth-child(3){
font-weight: bold;
background-color: rgba(219, 206, 44, 0.1);
border-top-right-radius: 20px;
border-top-left-radius: 20px;
padding: 32px 38px;
}
#my-table tr td:nth-child(3){
background-color: rgba(219, 206, 44, 0.1);
padding: 32px 38px;
}
#my-table tr th:nth-child(4){
font-weight: bold;
background-color: rgba(229, 76, 110, 0.1);
border-top-right-radius: 20px;
border-top-left-radius: 20px;
padding: 32px 38px;
}
#my-table tr td:nth-child(4){
color: #E54C6E;
background-color: rgba(229, 76, 110, 0.1);
padding: 32px 38px;
margin: 0% 15px;
}
#my-table .test{
padding-right: 20px;
}
#my-table tr td{
padding: 32px 38px;
}
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body id="my-table">
<!--main division-->
<div style="overflow-x:auto;">
<table>
<tr>
<th></th>
<th>test</th>
<th>test</th>
<th>Free</th>
</tr>
<tr class="first">
<td>test</td>
<td>test</td>
<td>test</td>
<td>test</td>
</tr>
<tr>
<td>test</td>
<td>test</td>
<td>test</td>
<td>test</td>
</tr>
<tr>
<td>test</td>
<td>test</td>
<td>test</td>
<td>test</td>
</tr>
</table>
</div>
</body>
</html>
As you can see in the snippet above, my table give back the border color but when I try it in my web the color itself is gone, even I put it the code and the css like I make in the snippet the color is lost
can someone help me to solve this? or tell me what's wrong with my code
If you want to get the table border then please modify the below css:
#my-table table {
border: none; // Remove this line
border-top: none; // Remove this line
border: 1px solid red; // Add this line
}
So I have been following this tutorial for making a calendar widget with html, css, and js but I am stuck on the CSS not working. Did I miss something or miss-type? Where is my html/css going wrong to not end up the same final result? When I try to edit certain CSS it doesn't seem to affect the output.
The tutorial is here for reference to how it is suppose to look like.
Here is my HTML:
#cal {
-moz-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.25);
-webkit-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.25);
margin: 50px auto;
font: 13px/1.5"Helvetica Neue", Helvatica, Arial, san-serif;
display: table;
}
#cal .header {
cursor: default;
background: #cd310d;
background: -mozlinear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
height: 34px;
position: relative;
color: #fff;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
font-weight: bold;
text-shadow: 0px -1px 0 #87260C;
text-transform: uppercase;
}
#cal .header span {
display: inline-block;
line-height: 34px;
}
#cal .header .hook {
width: 9px;
height: 28px;
position: absolute;
bottom: 60%;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
background: #ececec;
background: -moz-linear-gradient(right top, #fff, #827e7d);
background: -webkit-gradient(linear, right top, right bottom, from(#fff), to(#827e7d);
box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.65);
-moz-box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.65);
-webkit-box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.65);
}
.right.hook {
right: 15%;
}
.left.hook {
left: 15%;
}
#cal .header .button {
width: 24px;
text-align: center;
position: absolute;
}
#cal .header .left.button {
left: 0;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
border-right: 1px solid #ae2a0c;
}
#cal .header .right.button {
right: 0;
top: 0;
border-left: 1px solid #ae2a0c;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
#cal .header .button:hover {
background: -moz-linear-gradient(top, #d94215, #bb330f);
background: -webkit-gradient(linear, left top, left bottom, from (#d94215), to(#bb330f));
}
#cal .header .month-year {
letter-spacing: 1px;
width: 100%;
text-align: center;
}
#cal table {
background: #fff;
border-collapse: collapse;
}
#cal td {
color: #2b2b2b;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
border: 1px solid #e6e6e6;
cursor: default;
}
#cal #days td {
height: 25px;
line-height: 26px;
text-transform: uppercase;
font-size: 90%;
color: #9e9e9e;
}
#cal #days td:not(:last-child) {
border-right: 1px solid #fff;
}
#cal #cal-frame td.today {
background: #ededed;
color: #8c8c8c;
box-shadow: 1px 1px 0px #fff inset;
-moz-box-shadow: 1px 1px 0px #fff inset;
-webkit-box-shadow: 1px 1px 0px #fff inset;
}
#cal #cal-frame td:not(.nil):hover {
color: #fff;
text-shadow: #6C1A07 0px -1px;
background: #CD310D;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
-moz-box-shadow: 0px 0px 0px;
-webkit-box-shadow: 0px 0px 0px;
}
#cal #cal-frame td span {
font-size: 80%;
position: relative;
}
#cal #cal-frame td span:first-child {
bottom: 5px;
}
#cal #cal-frame td span:last-child {
top: 5px;
}
#cal #cal-frame table.curr {
float: left;
}
#cal #cal-frame table.temp {
position: absolute;
}
<div id="cal">
<div class="header">
<span class="left button" id="prev"> 〈 </span>
<span class="left hook"></span>
<span class="month-year" id="label"> June 2010 </span>
<span class="right hook"></span>
<span class="right button" id="next"> 〉 </span>
</div>
<table id="days">
<tr>
<td>sun</td>
<td>mon</td>
<td>tue</td>
<td>wed</td>
<td>fri</td>
<td>sat</td>
</tr>
</table>
<div id="cal-frame">
<table class="curr">
<tbody>
<tr>
<td class="nil"></td>
<td class="nil"></td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
</tr>
<tr>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td class="today">11</td>
<td>12</td>
</tr>
<tr>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
</tr>
<tr>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
</tr>
<tr>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td class="nil"></td>
<td class="nil"></td>
<td class="nil"></td>
</tr>
</tbody>
</table>
</div>
</div>
First I couldn't understand what is you actual query.
But the link you are referring is having a perfectly working CSS and HTML.
Plus the JS is also working.
The difference I found in the code you have provided are :-
Within the HTML:-
<table id="days">
<td>thu</td> <!-- Is missing -->
In the CSS :- (Use the below CSS totally)
body {
background: #e0e0e0;
}
#cal {
-moz-box-shadow:0px 3px 3px rgba(0, 0, 0, 0.25);
-webkit-box-shadow:0px 3px 3px rgba(0, 0, 0, 0.25);
margin:50px auto;
font: 13px/1.5 "Helvetica Neue", Helvatica, Arial, san-serif;
display:table;
}
#cal .header {
cursor:default;
background: #cd310d;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
height: 34px;
position: relative;
color:#fff;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
font-weight:bold;
text-shadow:0px -1px 0 #87260C;
text-transform: uppercase;
}
#cal .header span {
display:inline-block;
line-height:34px;
}
#cal .header .hook {
width: 9px;
height: 28px;
position: absolute;
bottom:60%;
border-radius:10px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
background:#ececec;
background: -moz-linear-gradient(right top, #fff, #827e7d);
background: -webkit-gradient(linear, right top, right bottom, from(#fff), to(#827e7d));
box-shadow:0px -1px 2px rgba(0, 0, 0, 0.65 );
-moz-box-shadow:0px -1px 2px rgba(0, 0, 0, 0.65 );
-webkit-box-shadow:0px -1px 2px rgba(0, 0, 0, 0.65 );
}
.right.hook {
right:15%;
}
.left.hook {
left: 15%;
}
#cal .header .button {
width:24px;
text-align:center;
position:absolute;
}
#cal .header .left.button {
left:0;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
border-right:1px solid #ae2a0c;
}
#cal .header .right.button {
right:0;
top:0;
border-left:1px solid #ae2a0c;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
#cal .header .button:hover {
background: -moz-linear-gradient(top, #d94215, #bb330f);
background: -webkit-gradient(linear, left top, left bottom, from(#d94215), to(#bb330f));
}
#cal .header .month-year {
letter-spacing: 1px;
width: 100%;
text-align: center;
}
#cal table {
background:#fff;
border-collapse:collapse;
}
#cal td {
color:#2b2b2b;
width:30px;
height:30px;
line-height:30px;
text-align:center;
border:1px solid #e6e6e6;
cursor:default;
}
#cal #days td {
height:26px;
line-height: 26px;
text-transform:uppercase;
font-size:90%;
color:#9e9e9e;
}
#cal #days td:not(:last-child) {
border-right:1px solid #fff;
}
#cal #cal-frame td.today {
background:#ededed;
color:#8c8c8c;
box-shadow:1px 1px 0px #fff inset;
-moz-box-shadow:1px 1px 0px #fff inset;
-webkit-box-shadow:1px 1px 0px #fff inset;
}
#cal #cal-frame td:not(.nil):hover {
color:#fff;
text-shadow: #6C1A07 0px -1px;
background:#CD310D;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
-moz-box-shadow:0px 0px 0px;
-webkit-box-shadow:0px 0px 0px;
}
#cal #cal-frame td span {
font-size:80%;
position:relative;
}
#cal #cal-frame td span:first-child {
bottom:5px;
}
#cal #cal-frame td span:last-child {
top:5px;
}
#cal #cal-frame table.curr {
float:left;
}
#cal #cal-frame table.temp {
position:absolute;
}
Screenshot :-
Hope this will work for you.
Can somebody help me to adjust the scrollbar inside the table with a fixed header?
table a:link {
color: #666;
font-weight: bold;
text-decoration:none;
}
table a:visited {
color: #999999;
font-weight:bold;
text-decoration:none;
}
table a:active,
table a:hover {
color: #bd5a35;
text-decoration:underline;
}
table {
font-family:Arial, Helvetica, sans-serif;
color:#666;
font-size:12px;
text-shadow: 1px 1px 0px #fff;
background:#eaebec;
margin:20px;
border:#ccc 1px solid;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
-moz-box-shadow: 0 1px 2px #d1d1d1;
-webkit-box-shadow: 0 1px 2px #d1d1d1;
box-shadow: 0 1px 2px #d1d1d1;
}
table th {
padding:21px 25px 22px 25px;
border-top:1px solid #fafafa;
border-bottom:1px solid #e0e0e0;
background: #ededed;
background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb));
background: -moz-linear-gradient(top, #ededed, #ebebeb);
}
table th:first-child {
text-align: left;
padding-left:20px;
}
table tr:first-child th:first-child {
-moz-border-radius-topleft:3px;
-webkit-border-top-left-radius:3px;
border-top-left-radius:3px;
}
table tr:first-child th:last-child {
-moz-border-radius-topright:3px;
-webkit-border-top-right-radius:3px;
border-top-right-radius:3px;
}
table tr {
text-align: center;
padding-left:20px;
}
table td:first-child {
text-align: left;
padding-left:20px;
border-left: 0;
}
table td {
padding:18px;
border-top: 1px solid #ffffff;
border-bottom:1px solid #e0e0e0;
border-left: 1px solid #e0e0e0;
background: #fafafa;
background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));
background: -moz-linear-gradient(top, #fbfbfb, #fafafa);
}
table tr.even td {
background: #f6f6f6;
background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f6f6f6));
background: -moz-linear-gradient(top, #f8f8f8, #f6f6f6);
}
table tr:last-child td {
border-bottom:0;
}
table tr:last-child td:first-child {
-moz-border-radius-bottomleft:3px;
-webkit-border-bottom-left-radius:3px;
border-bottom-left-radius:3px;
}
table tr:last-child td:last-child {
-moz-border-radius-bottomright:3px;
-webkit-border-bottom-right-radius:3px;
border-bottom-right-radius:3px;
}
table tr:hover td {
background: #f2f2f2;
background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#f0f0f0));
background: -moz-linear-gradient(top, #f2f2f2, #f0f0f0);
}
<div class="tablecontainer">
<div class="table" >
<table cellspacing='0'>
<thead>
<tr>
<th>Tutor Name </th>
<th>Tutor NRIC</th>
<th>Tutor Email</th>
<th>Tutor qualification</th>
</tr>
</thead>
<tbody>
<tr>
<td>Jane</td>
<td>1234567</td>
<td>Jane#gmail.com</td>
<td>Diploma</td>
</tr>
<tr>
<td>John</td>
<td>1234567</td>
<td>jphn#gmail.com</td>
<td>Diploma</td>
</tr>
</tbody>
</table>
</div>
</div>
Your tbody must have a height and an overflow rule to activate the scrollbar. Meanwhile your thead must be positioned
.wrap-scroll thead {
position: absolute;
left: 0;
top: 0;
width: 100%;
}
.wrap-scroll {
height: 106px;
overflow-y: auto;
}
See my DEMO for it
I have 3 gridviews in a table, 3 < td >. I created a CSS class to change color of Gridview rows upon mouse-hover. But the problem is, the BACKGROUND OF GRIDVIEWS ALSO CHANGE COLOR. So when I hover the cursor, each row changes color but also the background (< td >, the back of the gridview also) changes color. How do I change color of my gridviews' rows only?
Code:
<style type="text/css">
.CSSTable
{
margin: 0px;
padding: 0px;
width: 60%; /*Fits the <div>*/
box-shadow: 10px 10px 5px #888888;
border: 1px solid #000000;
}
.CSSTable table
{
border-collapse: collapse;
border-spacing: 0;
width: 100%; /*sets table all aligned*/
height: 100%;
margin: 0px;
padding: 0px;
}
.CSSTable tr:last-child td:last-child
{
-moz-border-radius-bottomright: 0px;
-webkit-border-bottom-right-radius: 0px;
border-bottom-right-radius: 0px;
}
.CSSTable table tr:first-child td:first-child
{
-moz-border-radius-topleft: 0px;
-webkit-border-top-left-radius: 0px;
border-top-left-radius: 0px;
}
.CSSTable table tr:first-child td:last-child
{
-moz-border-radius-topright: 0px;
-webkit-border-top-right-radius: 0px;
border-top-right-radius: 0px;
}
.CSSTable tr:last-child td:first-child
{
-moz-border-radius-bottomleft: 0px;
-webkit-border-bottom-left-radius: 0px;
border-bottom-left-radius: 0px;
}
.CSSTable tr:hover td
{
}
.CSSTable tr:nth-child(odd)
{
background-color: #e5e5e5;
}
.CSSTable tr:nth-child(even)
{
background-color: #ffffff;
}
.CSSTable td
{
vertical-align: middle;
border: 1px solid #000000;
border-width: 0px 1px 1px 0px;
text-align: left;
padding: 7px;
font-size: 11px;
font-family: Arial;
font-weight: normal;
color: #000000;
}
.CSSTable tr:last-child td
{
border-width: 0px 1px 0px 0px;
}
.CSSTable tr td:last-child
{
border-width: 0px 0px 1px 0px;
}
.CSSTable tr:last-child td:last-child
{
border-width: 0px 0px 0px 0px;
}
.CSSTable tr:first-child td
{
background: -o-linear-gradient(bottom, #4c4c4c 5%, #000000 100%);
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #4c4c4c), color-stop(1, #000000) );
background: -moz-linear-gradient( center top, #4c4c4c 5%, #000000 100% );
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#4c4c4c", endColorstr="#000000");
background: -o-linear-gradient(top,#4c4c4c,000000);
background-color: #4c4c4c;
border: 0px solid #000000;
text-align: center;
border-width: 0px 0px 1px 1px;
font-size: 10px;
font-family: Verdana;
font-weight: bold;
color: #ffffff;
}
.CSSTable tr:first-child:hover td
{
background: -o-linear-gradient(bottom, #4c4c4c 5%, #000000 100%);
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #4c4c4c), color-stop(1, #000000) );
background: -moz-linear-gradient( center top, #4c4c4c 5%, #000000 100% );
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#4c4c4c", endColorstr="#000000");
background: -o-linear-gradient(top,#4c4c4c,000000);
background-color: #4c4c4c;
}
.CSSTable tr:first-child td:first-child
{
border-width: 0px 0px 1px 0px;
}
.CSSTable tr:first-child td:last-child
{
border-width: 0px 0px 1px 1px;
}
.CSSTable tr:hover
{
background-color:Gray;
}
</style>
Well, since you haven't posted the pertinent html markup related to the this question I'm going to guess you have added the CSSTable class to your wrapper table? For example, if you have this html hierarchy...
<table class="CSSTable">
<tr>
<td><asp:GridView>...</asp:GridView></td>
</tr>
<tr>
<td><asp:GridView>...</asp:GridView></td>
</tr>
<tr>
<td><asp:GridView>...</asp:GridView></td>
</tr>
</table>
you should change it to...
<table>
<tr>
<td><asp:GridView CssClass="CSSTable">...</asp:GridView></td>
</tr>
<tr>
<td><asp:GridView CssClass="CSSTable">...</asp:GridView></td>
</tr>
<tr>
<td><asp:GridView CssClass="CSSTable">...</asp:GridView></td>
</tr>
</table>
or if you are only targeting the row hover just create a css class to handle the hover event and then set the CssClass property of the RowStyle element...
<asp:GridView>
<RowStyle CssClass="" />
</asp:GridView>
UPDATE : NOW IT WORKS IN CHROME AND NOT IN FIREFOX
I cant get a border radius and and a gradient on the header of the table at the same time.
//normal table
<table cellspacing="0">
<thead>
<tr class ="header">
<th>one</th><th>two</th><th>three</th><th>four</th>
</tr>
</thead>
<tr><td>onetd</td><td>twotd</td><td>threetd</td><td>fourtd</td></tr>
<tr><td>onetd</td><td>twotd</td><td>threetd</td><td>fourtd</td></tr>
<tr><td>onetd</td><td>twotd</td><td>threetd</td><td>fourtd</td></tr>
</table>
css that is not working. the gradient was taken from some gradient generator
tr:nth-child(even){
background-color: yellow;
}
tr:nth-child(odd){
background-color: green;
}
table thead tr.header{
border-top-left-radius: 30px;
border:1px solid black;
background-image: linear-gradient(bottom, rgb(52,156,235) 19%, rgb(61,224,216) 60%);
background-image: -o-linear-gradient(bottom, rgb(52,156,235) 19%, rgb(61,224,216) 60%);
background-image: -moz-linear-gradient(bottom, rgb(52,156,235) 19%, rgb(61,224,216) 60%);
background-image: -webkit-linear-gradient(bottom, rgb(52,156,235) 19%, rgb(61,224,216) 60%);
background-image: -ms-linear-gradient(bottom, rgb(52,156,235) 19%, rgb(61,224,216) 60%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.19, rgb(52,156,235)),
color-stop(0.6, rgb(61,224,216))
);
}
table thead tr.header > th:nth-child(1){
border-top-left-radius:10px;
}
I would definitely like it to work in major browsers
not working jsfiddle
css:
.border{
border: 2px solid #666666;
border-radius: 5px 5px 0px 0px;
-moz-border-radius: 5px 5px 0px 0px;
-webkit-border-radius: 5px 5px 0px 0px;
}
table {
margin: 50px;
border-spacing: 0;
width: 450px;
}
.border th:first-child {
border-radius: 5px 0 0 0;
-moz-border-radius: 5px 0 0 0;
-webkit-border-radius: 5px 0 0 0;
}
.border th:last-child {
border-radius: 0 5px 0 0;
-moz-border-radius: 0 5px 0 0;
-webkit-border-radius: 0 5px 0 0;
}
.border td:first-child, .border th:first-child {
border-left: medium none;
}
.border th {
background-color: #666666;
background-image: -moz-linear-gradient(center top , #3DE0D8, #349CEB);
background-image: -webkit-gradient(linear, 0 0, 0 bottom, from(#3DE0D8), to(#349CEB), color-stop(.4, #3DE0D8));
}
.border td, .border th {
border-left: 2px solid #666666;
border-top: 2px solid #666666;
padding: 10px;
text-align: center;
}
tr:nth-child(even){
background-color: yellow;
}
tr:nth-child(odd){
background-color: green;
}
html:
<table class="border">
<thead>
<tr>
<th><label>one</label></th>
<th><label>two</label></th>
<th><label>Three</label></th>
<th><label>Four</label></th>
</tr>
</thead>
<tbody>
<tr>
<td><label>one</label></td>
<td><label>two</label></td>
<td><label>Three</label></td>
<td><label>Four</label></td>
</tr>
<tr>
<td><label>one</label></td>
<td><label>two</label></td>
<td><label>Three</label></td>
<td><label>Four</label></td>
</tr>
<tr>
<td><label>one</label></td>
<td><label>two</label></td>
<td><label>Three</label></td>
<td><label>Four</label></td>
</tr>
</tbody>
</table>
You are using the incorrect name for the property it is border-top-left-radius not border-radius-top-left and you need a border to apply a border radius to.