Expanding a div based on a floated div

crabslabber

New Member
Second layout question for a CSS newbie.I have in my ASP.NET layout in the site master page the generated .Main div. I have added a new page called 'Show.aspx' and have added some divs to this. What im trying to do is to expand the '.main' div based on the size of the description div of 'Show.aspx'To add, I have added the 'description' div on the source server side, where as .main is in the site master CSS page.Here is the screenshot showing the issue:
GI9g7.jpg
As shown the white .main div is not expanding. I have tried adding overflow:auto but again to no avail. As I am using a float style on my div's after some research this could be the issue but I don't know why.Code:sitemaster .main: \[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head runat="server"><title></title><link href="http://stackoverflow.com/questions/15591346/~/Styles/Site.css" rel="stylesheet" type="text/css" /></head><body><form runat="server"><div class="page"> <asp:ContentPlaceHolder ID="HeadContent" runat="server"></asp:ContentPlaceHolder> <div class="header"> <div class="title"> <h1> <img id="Img1" src = "http://stackoverflow.com/questions/15591346/Images/coffe pic.png" alt="" runat="server" /> Coffee Stop </h1> </div> <div class="loginDisplay"> </div> <div class="clear hideSkiplink"> <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"> <Items> <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/> <asp:MenuItem Text="Shop Online" Value="http://stackoverflow.com/questions/15591346/Shop Online"></asp:MenuItem> <asp:MenuItem Text="Contact Us" Value="http://stackoverflow.com/questions/15591346/Contact Us"></asp:MenuItem> <asp:MenuItem Text="About Us" Value="http://stackoverflow.com/questions/15591346/About Us"></asp:MenuItem> </Items> </asp:Menu> </div> </div> <div class="main"> <asp:ContentPlaceHolder ID="MainContent" runat="server"/> </div> <div class="clear"> </div></div><div class="footer"></div></form></body></html>\[/code\]And my server side added divs of the Show.aspx page:\[code\]<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Show.aspx.cs" Inherits="ViewCDs.Show" %>\[/code\] \[code\] <asp:FormView ID="FormView1" runat="server" Height="141px"> <EditItemTemplate> coffeeName: <asp:TextBox ID="coffeeNameTextBox" runat="server" Text='<%# Bind("coffeeName") %>' /> <br /> coffeeOrigin: <asp:TextBox ID="coffeeOriginTextBox" runat="server" Text='<%# Bind("coffeeOrigin") %>' /> <br /> coffeeStrength: <asp:TextBox ID="coffeeStrengthTextBox" runat="server" Text='<%# Bind("coffeeStrength") %>' /> <br /> coffeeGrind: <asp:TextBox ID="coffeeGrindTextBox" runat="server" Text='<%# Bind("coffeeGrind") %>' /> <br /> coffeePrice: <asp:TextBox ID="coffeePriceTextBox" runat="server" Text='<%# Bind("coffeePrice") %>' /> <br /> coffeeQty: <asp:TextBox ID="coffeeQtyTextBox" runat="server" Text='<%# Bind("coffeeQty") %>' /> <br /> coffeeRRP: <asp:TextBox ID="coffeeRRPTextBox" runat="server" Text='<%# Bind("coffeeRRP") %>' /> <br /> <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" /> &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /> </EditItemTemplate> <InsertItemTemplate> coffeeName: <asp:TextBox ID="coffeeNameTextBox" runat="server" Text='<%# Bind("coffeeName") %>' /> <br /> coffeeOrigin: <asp:TextBox ID="coffeeOriginTextBox" runat="server" Text='<%# Bind("coffeeOrigin") %>' /> <br /> coffeeStrength: <asp:TextBox ID="coffeeStrengthTextBox" runat="server" Text='<%# Bind("coffeeStrength") %>' /> <br /> coffeeGrind: <asp:TextBox ID="coffeeGrindTextBox" runat="server" Text='<%# Bind("coffeeGrind") %>' /> <br /> coffeePrice: <asp:TextBox ID="coffeePriceTextBox" runat="server" Text='<%# Bind("coffeePrice") %>' /> <br /> coffeeQty: <asp:TextBox ID="coffeeQtyTextBox" runat="server" Text='<%# Bind("coffeeQty") %>' /> <br /> coffeeRRP: <asp:TextBox ID="coffeeRRPTextBox" runat="server" Text='<%# Bind("coffeeRRP") %>' /> <br /> <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" /> &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /> </InsertItemTemplate> <ItemTemplate> <b>Origin:</b> <asp:Label ID="coffeeOriginLabel" runat="server" Text='<%# Bind("coffeeOrigin") %>' /> <br /> <b>Grind:</b> <asp:Label ID="coffeeGrindLabel" runat="server" Text='<%# Bind("coffeeGrind") %>' /> <br /> <b>Price:
 
Back
Top