[RESOLVED]Making a footer stick to the bottom?

Hello

I am still trying to resolve a footer issue that has stretched over a couple of days.

In my ASP.NET project (VB), my Site.master has no CSS in it at all. All of my CSS is in logon.css here: 

<link href="<%= ResolveUrl("~/")%>Content/logon.css" rel="stylesheet" type="text/css" />

My Register.aspx file which is where I would like the footer to be placed, has no CSS in it, either, only an <h1> tag, four Labels and TextBoxes for the form fields, and all enclosed within <asp:Content></asp:Content>.

What I would like to achieve is what I have here:
http://www.bayingwolf.com/test1.html
with the footer rooted to the bottom of the page. The CSS in that html link is all in the logon.css file which Register.aspx references, but if I simply use <div class="page-wrap"> immediately above that first <h1> class
file as in the html link, I cannot get the footer to stick to the bottom of the page.

So something in my ASP.NET project is preventing me from seeing the footer as it is in the html link.

Thanks for any advice.

Bluenose

<link href="<%= ResolveUrl("~/")%>Content/logon.css" rel="stylesheet" type="text/css" />

The way you refer the css file is wrong. Above line of code wont properly refer the css. Please change your code like given below

<link href="<%= ResolveUrl("~/Content/logon.css") %>" rel="stylesheet" type="text/css" />

Hello A2H

I have replaced what I had with what you suggest, but it still won’t stay at the bottom:

http://www.bayingwolf.com/bottom_footer.jpg

You can try with the below css style to fix footer at bottom of page

HTML

<div id="Footer">
                    <%--Your content here--%>
                </div>

CSS Style

#Footer
        {
            position: absolute;
            bottom: 0px;
            background-color: #666;
            color: #eee;
            width:100%;
            text-align:center;
          
        }

I now have this at the top of my aspx file:

<link href="<%= ResolveUrl("~/Content/logon.css") %>" rel="stylesheet" type="text/css" />

    <style>

    #Footer
        {
            position: absolute;
            bottom: 0px;
            background-color: #666;
            color: #eee;
            width:100%;
            text-align:center;
          
        }
        </style>


       <h1 class="dima">Register</h1>

     <asp:Label ID="LblDate" runat="server" Cssclass="labelStyle" Text="Label"></asp:Label>

and this at the bottom:

 <div id="Footer" >This is test content
                    
                </div>

   </asp:Content>

That footer is not budging!

That’s why I suggested there was something in VS preventing the code from behaving as it should?

Would it be worth adding your suggestion to a normal HTML file in Visual Studio but not linked to Site.master?

Thanks again for your patience.

Hi use this css and put that id

<div id="Footer"> ——————   content goes here—————–</div>

#Footer {
            position: fixed;
            bottom: 0px;
            background-color: #666;
            color: #eee;
            width:100%;
            text-align:center;
}

hope this will help you.

Except for one aspx page, that seems to have done the trick, Bright.Pixel.

Thank you!

Leave a Reply