Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Main Content in Master Page

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
I also posted this in the CSS forum but since this is related to a master page, I thought I would also post it here...

I'm trying to set the main content of an asp.net master page to 100% and push the footer to the bottom of the page. I can set the min-height to make that happen but I want the page to adjust to each persons browser and resolution.

any help would be appreciated thanks

.main
{
padding: 0px 12px;
margin: 12px 8px 8px 8px;
min-height: 420px;

}

.footer
{

padding: 8px 0px 0px 0px;
margin: 0px auto;
text-align: center;
line-height: normal;
bottom:0;
width:100%;

}


 
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<div class="page" style="width: auto; height: auto; top: 0px;">
<div class="header">
<div class="Gradient">
<div class="loginDisplay">
<asp:Image ID="Image3" runat="server" ImageUrl="~/Images/title.png"
style="z-index: 1; left: 95px; top: 44px; position: absolute" />
<asp:Image ID="image1" runat="server"
ImageUrl="~/Images/MyImage.png"

style="z-index: 1; left: 12px; top: 14px; position: absolute; width: 176px; height: 40px" />
<asp:Label ID="Label1" runat="server" Text="MyText"
style="float: none; " Font-Names="Verdana" Font-Size="Medium"
ForeColor="White"></asp:Label>
<br />
<asp:Label ID="lu" runat="server" Font-Names="Verdana"></asp:Label>
<br />
<asp:Label ID="lg" runat="server" Font-Names="Verdana"></asp:Label>
<br />
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
</asp:ScriptManager>
<asp:Image ID="Image2" runat="server" Height="47px"
ImageUrl="~/Images/MyImage.png"
style="z-index: 1; left: 811px; top: 25px; position: absolute; margin-left: 0px; right: 446px;"
Width="86px" Visible="False" />
<asp:LinkButton ID="lb1" runat="server" Font-Names="Verdana" Font-Size="Small"
ForeColor="White">Logout</asp:LinkButton>
</div>
</div>
<div class="clear hideSkiplink">
<uc1:MenuControl ID="MenuControl1" runat="server" />
</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
<div class="clear">
</div>
</div>
<div class="footer">

<asp:Label ID="l1" runat="server" Font-Names="Verdana" Font-Size="Medium"
ForeColor="Black"
Text="My Text"
Font-Bold="False"></asp:Label>

<br />

<asp:Image ID="Image4" runat="server" Height="47px"
ImageUrl="~/Images/MyImage.png" Width="86px" />

</div>
</form>
</body>
</html>


 
sorry, was out of the office...

anyway, I trying to set the footer to the bottom of every content page regardless of what's actually in the content area of the page. I can set the bottom to 0 with absolute position and that will work until the page needs to grow. hope I'm making sense

 
So, do you mean you want the footer to always be visible, no matter how long the page is? You always want it to be in view?
 
Not sure how/if you can do it with straight CSS.
you may have to write some JS to do this. You need to research it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top