I am putting this here because I believe the underlying problem is not understanding what tags to put "runat server" on to work with ASP and which not to. My problem is that I have a table as such:
***************
* A * *
* * *
***** C *
* * *
* B * *
* * *
* * *
***************
I want A to be fixed height, so that B will stretch when C expands in height. I have set up ID's for TD tags and have set CSS rules so that A's height is 100px and B= 100 %. Problem is that A expands to much more than 100px when I put a large picture in C.
My problem is that I am just going in and putting "runat server" properties hit and miss trying to get this to work. What do I have to do to the code below to get it so that A won't stretch above the 75 px?? In the code below it is the TD with ID "Sidebarabove" that I don't want changing.
Any help would be apprecited--this is driving me crazy.
Thanks in advance,
Rob
<%@ 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 id="head1" runat="server">
<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 id="body1" runat="server">
<form id="form1" runat="server">
<table id="MainTable" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td id="Banner" colspan="2" style="height: 150px"><img src="Site_Images/rbanner.jpg" runat="server"/></td>
</tr>
<tr>
<td id="Sidebar" valign="top">
<div id="loginstate" align="center">
<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>
</div>
<asp:TreeView CssClass="TreeControl" ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1"
ForeColor="Black" NodeIndent="10" ShowLines="True">
<SelectedNodeStyle Font-Bold="True" />
</asp:TreeView>
</td>
<td id= "MainContent" valign="top">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</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;
}
.TreeControl
{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:0.8em;
font-weight:Normal;
color:#000000;
}
#loginstate
{
color:#0000ff;
font-weight:bold;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:0.8em;
}
#login
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 1.0em;
font-weight: Normal;
}
#MainTable {
width: 800px;
}
#BannerBelow {
height: 90px;
width: 800px;
}
#Banner {
height: 150px;
width: 800px;
}
#Sidebar {
height: 300px;
width: 150px;
background-image: url(Site_Images/sideback.jpg);
background-repeat: repeat-y;
border-left-width: medium;
border-left-style: inset;
border-left-color: #000000;
top: 5px;
position:inherit;
}
#MainContent {
width: 650px;
border-right-width: medium;
border-right-style: inset;
border-right-color: #000000;
border-left-width: thin;
border-left-style: inset;
border-left-color: #000000;
}
#Charter
{
width: 336px;
padding: 5px;
border: thin solid #000000;
background-color: #333333;
}
#Link
{
width:100%;
height:100%;
border: thin solid #000000;
}