I'm just learning CSS and .NET, and I've come across a problem. I'm using a master page, and when I try to add a gridview to page1.aspx of my site (which is linked to the master page) my main content container doesn't stretch enough, meaning the paging controls of the gridview overlap the footer.
I'm sure this is a very simple problem, but I've been at it for hours and hours, so I thought I'd ask for some help!
Thanks in advance!
Here's an example page:
http://www.andyholliday.com/test.html
The red div is in the only thing in the Master page. The detailsview is in the content page and it stretches beyond the DIV with records with lots of text. I just want the red DIV to stretch with the detailsview!!
Here's the master page code:
And here's the content page code:Code:<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> <link href="generalStyles.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <div id="leftmenuContainer"> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html>
and here's the stylesheet:Code:<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="clearing" %> <asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder1"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:myconnection %>" SelectCommand="SELECT [cour_desc], [cour_title], [cour_deptid], [cour_id], [cour_start] FROM [mytable]"> </asp:SqlDataSource> <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" CellPadding="4" DataKeyNames="cour_id" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" style="position: relative; top: 62px; left: 234px; height: 110px; margin-bottom: 0px;" Width="486px"> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" /> <RowStyle BackColor="#EFF3FB" /> <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <Fields> <asp:BoundField DataField="cour_desc" HeaderText="cour_desc" SortExpression="cour_desc" /> <asp:BoundField DataField="cour_title" HeaderText="cour_title" SortExpression="cour_title" /> <asp:BoundField DataField="cour_deptid" HeaderText="cour_deptid" SortExpression="cour_deptid" /> <asp:BoundField DataField="cour_id" HeaderText="cour_id" SortExpression="cour_id" InsertVisible="False" ReadOnly="True" /> <asp:BoundField DataField="cour_start" HeaderText="cour_start" SortExpression="cour_start" /> </Fields> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" /> <AlternatingRowStyle BackColor="White" /> </asp:DetailsView> </asp:Content>
Please help it's driving me nuts!!!!!Code:#leftmenuContainer { width: 800px; margin-left: auto; margin-right: auto; background-color: red; }



Reply With Quote
Bookmarks