Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Main Content in Master Page

Main Content in Master Page

Main Content in Master Page

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

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



padding: 8px 0px 0px 0px;
margin: 0px auto;
text-align: center;
line-height: normal;


RE: Main Content in Master Page

Post your markup

RE: Main Content in Master Page

<head runat="server">
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
<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"

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"
<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:Image ID="Image2" runat="server" Height="47px"
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"
<div class="clear hideSkiplink">
<uc1:MenuControl ID="MenuControl1" runat="server" />
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
<div class="clear">
<div class="footer">

<asp:Label ID="l1" runat="server" Font-Names="Verdana" Font-Size="Medium"
Text="My Text"

<br />

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


RE: Main Content in Master Page

Can you describe the issue you are having?

RE: Main Content in Master Page

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

RE: Main Content in Master Page

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?

RE: Main Content in Master Page

yes, if possible

RE: Main Content in Master Page

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close