Click here to Skip to main content
15,943,077 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a master page with header n footer. I am using css also. But after run the footer is not displaying in the web page. What is the problem ?

XML
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterAdmin.master.cs" Inherits="Admin_MasterAdmin" %>

<!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">
    <link href="../App_Theme/Style1.css" rel="stylesheet" type="text/css" />
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <style type="text/css">
        .style1
        {
            height: 17px;
        }
    </style>
</head>
<body bgcolor="#991109">
    <form id="form1" runat="server">
    <table style="height:auto; width:100%;">
    <tr>
    <td>
    <div id="header1">
        <br />
        <asp:Label ID="Label1" runat="server" Text="utoSS" Font-Size="30pt"
            style="font-family: Algerian"></asp:Label></div>
    </td>
    </tr>
    <tr>
       <td id="menu" style="background-color:Silver;" class="style2">
                          <table><tr>
                             <td style=" width:800px; float:left;">
                                     &nbsp;<a href="Programmer.aspx" title="programer" style="color:Black;">Programmer</a>&nbsp;||&nbsp; <a href="Teamlead.aspx"style=" color:Black;" title="TL">Team Lead</a>&nbsp;||&nbsp; <a href="Projectlead.aspx"style=" color:Black;" title="PL">Project Lead</a>
                              </td>
                              <td style="width:400px;" align="right">

                                  <a href="AdminLogin.aspx"style=" color:Black; float:right;" title="signout">Log Out&nbsp;</a></td>
                          </tr></table>
       </td>
    </tr>
    <tr><td id="welcome" style="height:25px; width:100%; background-color:Silver;">
            <table><tr>
             <td style=" width:800px; float:left;">Welcome&nbsp; <%Label2.Text = Session["nm"].ToString(); %>
                 <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
                </td>
                <td style="width:400px;" align="right">

                    <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>&nbsp;&nbsp;<%Label3.Text = DateTime.Now.ToString(); %></td>
            </tr></table>
        </td></tr>
    </table>
    <table width="100%">
    <tr>
    <td id="sideleftbar">
        <table style="width: 79%; background-color:Silver; border-radius:15px;">
            <tr><td align="center" style="border-top-left-radius:15px;border-top-right-radius:15px; background-color:Fuchsia;"><h3>Quick Link</h3>
            <img alt="" class="style1" src="../Images/crest-line.gif" />
            </td></tr>
            <tr><td></td></tr>
            <tr><td align="center"><a href="Createuser.aspx">Create User</a></td></tr>
            <tr><td align="center"><a href="viewprofile.aspx">View Profile</a></td></tr>
            <tr><td align="center"><a href="changepassword.aspx">Change Password</a></td></tr>
            <tr><td align="center"><a href="AdminLogin.aspx">Log Out</a></td></tr>
            </table>
    </td>
    <td id="siderightbar">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

        </asp:ContentPlaceHolder>
    </td>
    </tr>
    </table>
    <table id="footer">
    <tr><td>
        <asp:Label ID="Label4" runat="server" Text="2012 Universal Technology Solutions. All rights reserved."></asp:Label></td></tr>
    </table>
    </form>
</body>
</html>




CSS
#adm
{
    margin:150px 0px 0px 500px;
    border-style: none;
    border-color: inherit;
    border-width: 5px;
    background: #999999;
    color:Aqua;
    height:150px;
    width:261px;
    border-radius:20px;
    text-shadow:2px 2px 2px #000;
    -moz-box-shadow: 0 0 5px 5px #888;
    -webkit-box-shadow: 0 0 5px 5px#888;
    box-shadow: 0 0 5px 5px #888;
}
#header1
{
    height:100px;
    width:100%;
    background-color:Green;
    text-align:center;
    text-transform:uppercase;
    text-shadow:3px 3px 3px #000;
 }
#content-wrapper {
    width: 100%;
    height: auto;
    margin: 5px auto;
    padding: 0px;
    background:#FFFFFF;
}
#sideleftbar {
    float: left;
    width: 15%;
    padding: 0px 0px 0px 0px;
    height:auto;
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}
#siderightbar
{
    float:right;
    width: 85%;
    margin: 0;
    padding: 0px 0px 0px 0px;
    height:auto;
 }
 #footer
{
    height:50px;
    width:100%;
    background-color:Green;
    text-align:center;
    text-shadow:3px 3px 3px #000;
 }
Posted

1 solution

XML
<div class="footer"> Try this as your Footer. Align the text as you need.</div>



CSS///
<pre lang="css">.footer {
    background-color:#336755;
    height:50px;
    position:fixed;
    bottom:0px;
    left:0px;
    width:100%;
}</pre>
 
Share this answer
 
Comments
NayakMamuni 21-Oct-12 2:38am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900