The id
of the GridView
will no longer be just grid
when inside the TabControl
. So the css style of #grid
will no longer work.
The id
of your grid would be something like TabContainer1_pnl1_grid
.
One way to get your styles to work is to assign a CssClass
of grid
(or whatever you want to call it) on your GridView
.
<asp:GridView ID="grid" runat="server" CssClass="grid">
and change your styles to use .grid
instead of #grid
.
.grid
{
border: none;
}
.grid th
{
background: linear-gradient(#FAFAFA, #D8D8D8);
padding: 5px;
border-bottom: 1px solid gray;
border-top: 1px solid gray;
border-left: none;
border-right: none;
font-style: normal;
font-weight: normal;
}
.grid td
{
padding: 5px;
border-bottom: 1px solid gray;
border-top: 1px solid gray;
border-left: none;
border-right: none;
width: 100px;
}