title: css problem in top:?
body: <p>i have to fix the header in a gridview and i use this in style Class</p>
  
  <pre><code>&lt;style type="text/css"&gt;
   .gridFixedHeader
  {
  background-color:white;
  position:relative;
  top:expression(GridView1.offsetParent.scrollTop-2);
  }
  &lt;/style&gt;
  </code></pre>
  
  <p>but i get an error that expression(GridView1.offsetParent.scrollTop-2);is not valid...
  what all do i need to do to make this work..... </p>
  
  <p>any suggestions</p>
  
  <p>Main aim... to fix the headers so they dont move when the gridview is scrolled up or down...</p>
  
  <p>any help will be appreciated...</p>
  
  <p>here is my gridview code</p>
  
  <pre><code>&lt;asp:Panel ID="Panel1" runat="server" Height="100px" ScrollBars="Vertical"&gt;
  
   &lt;asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
          AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
          BorderStyle="None" BorderWidth="1px" CellPadding="3"  
          DataKeyNames="MachineGroupID" DataSourceID="SqlDataSource1"&gt;
          &lt;RowStyle ForeColor="#000066" /&gt;
          &lt;HeaderStyle CssClass="gridFixedHeader" /&gt;
          &lt;Columns&gt;
              &lt;asp:BoundField DataField="MachineGroupID" HeaderText="MachineGroupID" 
                  InsertVisible="False" ReadOnly="True" SortExpression="MachineGroupID" /&gt;
              &lt;asp:BoundField DataField="MachineGroupName" HeaderText="MachineGroupName" 
                  SortExpression="MachineGroupName" /&gt;
                          &lt;/Columns&gt;
          &lt;FooterStyle BackColor="White" ForeColor="#000066" /&gt;
          &lt;PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /&gt;
          &lt;SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /&gt;
          &lt;HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /&gt;
      &lt;/asp:GridView&gt;
      &lt;/asp:Panel&gt;
  </code></pre>
  
  <p>so here i have a gridview where when i scroll the header row moves too.. i dont want that to happen..</p>