Table cell auto stretching vertically when defined height
--------------------------------------------------------------------------------
I am new to HTML and will have to beg if this is obvious, but I am trying to design a table that looks like:
********************************
*----A------*------------------------*
************------------------------*
*------------*------------------------*
*------------*------------------------*
*----B------*------------C----------*
*------------*-------------------------*
********************************
Basically I want A to be defined height of 100 PX and C to vary depending upon the content. B should autostretch to accomodate C. What is happening, however, is that A is stretching beyond the 100 PX. When C is shorter than 100 px, however, A remains at 100 and C will stretch to accomodate.
Below is my code along with CSS sheet.
I have been working on this for a week and can't seem to find out what I am doing wrong. Any help would be much appreciated!!!
<%@ 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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Knights Of Columbus Site</title>
<link href="main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<table id="MainTable" bgcolor="#FFFFFF" align="center">
<tr>
<td id="Banner" colspan="2"><img src="Site_Images/rbanner.jpg"/></td>
</tr>
<tr>
<td id="Sidebarabove" valign="top">
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate >
You are not logged in.
</AnonymousTemplate>
<LoggedInTemplate>
Welcome<br />
<asp:LoginName ID="LoginName1" runat="server" />
<br />
<asp:LoginStatus ID="LoginStatus1" runat="server" ForeColor="Black" />
</LoggedInTemplate>
</asp:LoginView>
</td>
<td id= "MainContent" valign="top" rowspan="2">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td id="Sidebarbelow" valign="top">
<asp:TreeView CssClass="TreeControl" ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1"
ForeColor="Black" NodeIndent="10" ShowLines="True">
<SelectedNodeStyle Font-Bold="True" />
</asp:TreeView>
</td>
</tr>
<tr>
<td id="BannerBelow" colspan="2"><img src="Site_Images/banbelow.jpg" runat="server"/></td>
</tr>
</table>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</form>
</body>
</html>
CSS=
body {
background-color: #000099;
}
#MainTable
{
width: 800px;
}
#Banner
{
height: 150px;
width: 800px;
}
#Sidebarbelow
{
width: 150px;
background-image: url(Site_Images/sideback.jpg);
background-repeat: repeat-y;
height:100%;
}
#Sidebarabove {
width: 150px;
height:100px;
background-image: url(Site_Images/sideback.jpg);
background-repeat: repeat-y;
}
#MainContent {
width: 650px;
height: 100%;
}