..I add a min-height in the container.
I don't understand this...I have a basic masterpage that has a container. I have to add a min-height to get it to work. I used Richard's column example in his Instant Results book for the basic masterpage (minus the columns) and then tried to get a couple columns in the content page. This works great--only as long as I set the min-height of the container div in the masterpage--why??? That one style fixes it...and I don't know why.
Thanks, in advance,
Rob
Here is my content page:
<%@ Page Language="
VB" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="false" CodeFile="addawards.aspx.
vb" Inherits="Admin_addawards" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<div style="float:left; width:400px">
<div style="margin:10px; padding-left:75px">
<asp:Label ID="Label1" runat="server" Text="Edit Award Titles" Font-Bold="true" Font-Underline="true"></asp:Label>
</div>
<div style="margin:10px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" DataKeyNames="AwardID" GridLines="None" ShowHeader="False" >
<Columns>
<asp:BoundField DataField="Location" HeaderText="Location" SortExpression="Location" />
<asp:CommandField ShowDeleteButton="True" />
<asp:ButtonField CommandName="SELECT" Text="Edit Places" />
</Columns>
<HeaderStyle BackColor="Yellow" />
</asp:GridView>
</div>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="Searing.SunArtSite.BO.Award"
DeleteMethod="DeleteAward" SelectMethod="GetList"
TypeName="Searing.SunArtSite.Bll.AwardsManager"></asp:ObjectDataSource>
<div style="margin:10px; padding-left:50px">
<asp:Label ID="Label2" runat="server" Text="Edit Places" Font-Bold="true" Font-Underline="true"></asp:Label>
</div>
<div style="margin:10px">
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="ODSPlaceList" DataKeyNames="placeID" GridLines="None" ShowHeader="False">
<Columns>
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" />
<asp:CommandField ShowDeleteButton="True" />
</Columns>
</asp:GridView>
</div>
<asp:ObjectDataSource ID="ODSPlaceList" runat="server"
SelectMethod="GetPlaceListPerAward" TypeName="Searing.SunArtSite.Bll.PlaceManager" DataObjectTypeName="Searing.SunArtSite.BO.Place" DeleteMethod="DeletePlace">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<div style="float:left; margin:10px">
<div>
<asp:Label ID="Label3" runat="server" Text="Add Or Edit Award" Font-Underline="true" Font-Bold="true"></asp:Label>
</div>
<div>
<asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource2">
<EditItemTemplate>
Location:
<asp:TextBox ID="LocationTextBox" runat="server" Text='<%# Bind("Location") %>'>
</asp:TextBox><br />
AwardID:
<asp:TextBox ID="AwardIDTextBox" runat="server" Text='<%# Bind("AwardID") %>'>
</asp:TextBox><br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update">
</asp:LinkButton>
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel">
</asp:LinkButton>
</EditItemTemplate>
<InsertItemTemplate>
Location:
<asp:TextBox ID="LocationTextBox" runat="server" Text='<%# Bind("Location") %>'>
</asp:TextBox><br />
AwardID:
<asp:TextBox ID="AwardIDTextBox" runat="server" Text='<%# Bind("AwardID") %>'>
</asp:TextBox><br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="Insert">
</asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel">
</asp:LinkButton>
</InsertItemTemplate>
<ItemTemplate>
Location:
<asp:Label ID="LocationLabel" runat="server" Text='<%# Bind("Location") %>'></asp:Label><br />
AwardID:
<asp:Label ID="AwardIDLabel" runat="server" Text='<%# Bind("AwardID") %>'></asp:Label><br />
</ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetItem" TypeName="Searing.SunArtSite.Bll.AwardsManager">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</div>
</asp:Content>
Here is the masterpage:
<%@ Master Language="
VB" CodeFile="AdminMasterPage.master.
vb" Inherits="Admin_AdminMasterPage" %>
<!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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Admin</title>
<link href="~/mainstyle.css" rel="stylesheet" type="text/css" />
<script language="javascript" type='text/javascript' >
function ImageHover(name)
{
name.originalSrc = name.src;
name.src = '../Site_Images/' + name.id + 'Selecting.bmp';
}
function ImageLeave(name)
{
name.src = name.originalSrc;
}
</script>
</head>
<body>
<form id="form2" runat="server" accept="4">
<div id='main'>
<div id='header' >
<asp:Image ID="Image1" runat="server" ImageUrl="../Site_Images/sunbanner.jpg" />
</div>
<div id='addpicturesbutton'>
<asp:ImageButton ID="addPicturesButton" runat="server" PostBackUrl="~/Admin/addpictures.aspx" />
</div>
<div id='addshowbutton'>
<asp:ImageButton ID="addShowsButton" runat="server" PostBackUrl="~/Admin/addshows.aspx" />
</div>
<div id='addawardsbutton'>
<asp:ImageButton ID="addAwardsButton" runat="server" PostBackUrl="~/Admin/addawards.aspx" />
</div>
<div id='container' style="min-height:50px">
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id='footer' style="position:relative;">
<div style="float:left;">
<asp:LoginView ID="LoginView1" runat="server" >
<AnonymousTemplate >
You are not logged in.
</AnonymousTemplate>
<LoggedInTemplate>
Welcome
<asp:LoginName ID="LoginName1" runat="server" />
(<asp:LoginStatus ID="LoginStatus1" runat="server" ForeColor="Black" LogoutPageUrl="../default.aspx" LogoutAction="Redirect" />)
</LoggedInTemplate>
</asp:LoginView>
</div>
<span style="margin-left:40px">Future Copyright Info</span>
</div>
</div>
</form>
</body>
</html>
Here is the css page:
body {
font-family: sans-serif;
margin: 0;
margin-top:5px;
padding: 0;
background: url(site_images/back.jpg) center;
background-repeat: repeat-y;
}
h1, h6 {
margin: 0;
font-weight: normal;
}
div#main {
width:800px;
margin-left:auto;
margin-right:auto;
}
div#container {
border-left: 2px solid black;
border-right: 2px solid black;
border-bottom: 1px solid black;
}
div#header {
border: 2px solid black;
height:245px;
margin-bottom:5px;
}
div#footer
{
background:white;
border-bottom: 2px solid black;
border-left: 2px solid black;
border-right: 2px solid black;
border-top: 1px solid black;
padding:10px;
}
div#test {
font: arial;
}
div#aboutbutton {
border: 2px solid black;
float:left;
height:50px;
}
div#addpicturesbutton
{
border: 2px solid black;
float:left;
height:50px;
}
div#addshowbutton
{
border-top: 2px solid black;
border-bottom: 2px solid black;
float:left;
height:50px;
}
div#addawardsbutton
{
border: 2px solid black;
float:left;
height:50px;
}
div#exhibitbutton {
border-top: 2px solid black;
border-bottom: 2px solid black;
float:left;
height:50px;
}
div#awardsbutton {
border: 2px solid black;
float:left;
height:50px;
}
div#artbutton {
border-top: 2px solid black;
border-bottom: 2px solid black;
border-right: 2px solid black;
float:left;
height:50px;
}
div#sunpic
{
margin-top:10px;
margin-left:10px;
margin-right:10px;
border:2px solid black;
height:351px;
width:250px;
float:left;
}
div#abouttext
{
margin:10px;
font-family: sans-serif;
}
#login
{
background:white;
border-right:2px solid black;
}