Sometimes the easiest things to do eat up most of my time. Like this one — This is what i want to accomplish:
My content in the middle with a border on both ends, extending to the bottom. The vertical scrollbar will only appear when you go beyond. You’d think that you only need a table with height:100%; But it’s not as easy as the width where you can just say width:100%;
100% means you want to eat up all of the *available* space. That means if the container holding your table, or whatever has a height of, say, 200px, then your table can only extend to as far as 100px. So what we need to do is declare the holding container to 100% as well. And that’s just what i did to the HTML tag.
I’m a fan of DIV, so i just used DIV.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HeightOneHundred.aspx.cs"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<title>Height One Hundred Percent</title>
<form id="MainForm" runat="server">
It’s also important to take note that if you’re dealing with a FORM, to put it inside of the mainDiv