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="Maste rPage.master.vb " Inherits="Maste rPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Knight s Of Columbus Site</title>
<link href="main.css" rel="stylesheet " type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<table id="MainTable" bgcolor="#FFFFF F" align="center">
<tr>
<td id="Banner" colspan="2"><im g src="Site_Image s/rbanner.jpg"/></td>
</tr>
<tr>
<td id="Sidebarabov e" valign="top">
<asp:LoginVie w ID="LoginView1 " runat="server">
<AnonymousTempl ate >
You are not logged in.
</AnonymousTempla te>
<LoggedInTempla te>
Welcome<br />
<asp:LoginNam e ID="LoginName1 " runat="server" />
<br />
<asp:LoginStatu s ID="LoginStatus 1" runat="server" ForeColor="Blac k" />
</LoggedInTemplat e>
</asp:LoginView>
</td>
<td id= "MainConten t" valign="top" rowspan="2">
<asp:ContentPla ceHolder ID="ContentPlac eHolder1" runat="server">
</asp:ContentPlac eHolder>
</td>
</tr>
<tr>
<td id="Sidebarbelo w" valign="top">
<asp:TreeView CssClass="TreeC ontrol" ID="TreeView1" runat="server" DataSourceID="S iteMapDataSourc e1"
ForeColor="Blac k" NodeIndent="10" ShowLines="True ">
<SelectedNodeSt yle Font-Bold="True" />
</asp:TreeView>
</td>
</tr>
<tr>
<td id="BannerBelow " colspan="2"><im g src="Site_Image s/banbelow.jpg" runat="server"/></td>
</tr>
</table>
<asp:SiteMapDat aSource ID="SiteMapData Source1" 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%;
}
#BannerBelow {
height: 90px;
width: 800px;
}
The content page is
<%@ Page Language="VB" MasterPageFile= "~/MasterPage.mast er" AutoEventWireup ="false" CodeFile="Defau lt.aspx.vb" Inherits="_Defa ult" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHol derID="ContentP laceHolder1" Runat="Server">
<table>
<tr>
<td id="Charter">
<img src="Site_Image s/charter.jpg" />
</td>
<td id="Link" valign="top" align="center">
<img src="Site_Image s/links.jpg" />
<br />
<asp:HyperLin k ID="HyperLink1 " runat="server" NavigateUrl="ht tp://www.kofc.org/">Supreme Council Website</asp:HyperLink>
<br />
<asp:HyperLin k ID="HyperLink3 " runat="server" NavigateUrl="ht tp://www.kansas-kofc.org/">State Website</asp:HyperLink>
<br />
<asp:HyperLin k ID="HyperLink2 " runat="server" NavigateUrl="ma ilto:Kirby.Schm elzle@ KOFC.ORG">Email Kirby Schmelze-Knights Insurance</asp:HyperLink>
</td>
</tr>
<tr>
</tr>
</table>
</asp:Content>
Kind Regards,
Rob
*************** *************** **
*----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="Maste rPage.master.vb " Inherits="Maste rPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Knight s Of Columbus Site</title>
<link href="main.css" rel="stylesheet " type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<table id="MainTable" bgcolor="#FFFFF F" align="center">
<tr>
<td id="Banner" colspan="2"><im g src="Site_Image s/rbanner.jpg"/></td>
</tr>
<tr>
<td id="Sidebarabov e" valign="top">
<asp:LoginVie w ID="LoginView1 " runat="server">
<AnonymousTempl ate >
You are not logged in.
</AnonymousTempla te>
<LoggedInTempla te>
Welcome<br />
<asp:LoginNam e ID="LoginName1 " runat="server" />
<br />
<asp:LoginStatu s ID="LoginStatus 1" runat="server" ForeColor="Blac k" />
</LoggedInTemplat e>
</asp:LoginView>
</td>
<td id= "MainConten t" valign="top" rowspan="2">
<asp:ContentPla ceHolder ID="ContentPlac eHolder1" runat="server">
</asp:ContentPlac eHolder>
</td>
</tr>
<tr>
<td id="Sidebarbelo w" valign="top">
<asp:TreeView CssClass="TreeC ontrol" ID="TreeView1" runat="server" DataSourceID="S iteMapDataSourc e1"
ForeColor="Blac k" NodeIndent="10" ShowLines="True ">
<SelectedNodeSt yle Font-Bold="True" />
</asp:TreeView>
</td>
</tr>
<tr>
<td id="BannerBelow " colspan="2"><im g src="Site_Image s/banbelow.jpg" runat="server"/></td>
</tr>
</table>
<asp:SiteMapDat aSource ID="SiteMapData Source1" 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%;
}
#BannerBelow {
height: 90px;
width: 800px;
}
The content page is
<%@ Page Language="VB" MasterPageFile= "~/MasterPage.mast er" AutoEventWireup ="false" CodeFile="Defau lt.aspx.vb" Inherits="_Defa ult" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHol derID="ContentP laceHolder1" Runat="Server">
<table>
<tr>
<td id="Charter">
<img src="Site_Image s/charter.jpg" />
</td>
<td id="Link" valign="top" align="center">
<img src="Site_Image s/links.jpg" />
<br />
<asp:HyperLin k ID="HyperLink1 " runat="server" NavigateUrl="ht tp://www.kofc.org/">Supreme Council Website</asp:HyperLink>
<br />
<asp:HyperLin k ID="HyperLink3 " runat="server" NavigateUrl="ht tp://www.kansas-kofc.org/">State Website</asp:HyperLink>
<br />
<asp:HyperLin k ID="HyperLink2 " runat="server" NavigateUrl="ma ilto:Kirby.Schm elzle@ KOFC.ORG">Email Kirby Schmelze-Knights Insurance</asp:HyperLink>
</td>
</tr>
<tr>
</tr>
</table>
</asp:Content>
Kind Regards,
Rob
Comment