How to align the footer to bottom of page without using footer tag

Total Post:159

Points:1117
 1902  View(s)
Ratings:
Rate this:

I am a beginner and i have a doubt.i created the Html with table and i need to place the footer at the bottom of the page without using footer tag.is there any way to place the footer at the bottom by using table? it will be helpful

<table>              

    <tr><h2><img src="lock.jpg"  width="80" height="30"/>Welcome to Locker</h2></tr>    

    <tr><td>

 <table align="center">

<tr>

<td align="right"><h4><p> Lock name:</p></h4>

</td>

<td align="left">

    <h4><input type="text" maxlength="8" name="lock" onkeyup="return AllowLock()"/>

</h4></td>

<td>

<h6 id="errfn"> </h6>

</td>

     </tr>

<tr>

<td align="right"><h4><p> Key:</p></h4></td>

    <td align="left"><h4><input type="text" maxlength="8" name="keys" onkeyup="return AllowKey()"/>

</h4></td>

<td>

<h6 id="error"></h6></td>

    </tr>

<tr>

<td align="right"></td>

    <td align="left"><input id="gobutton" type="submit" value="Go!"/></td>

</tr>

    </form>

     </table>

        </td></tr>

        <tr><td>

<p id="about">About</p>

<p id="contact">Contact us</p>

<p id="career">Careers</p>

    <p id="press">Press</p>

</tr>

</td>

</table>

  1. Post:412

    Points:2888
    Re: How to align the footer to bottom of page without using footer tag

    Hi Samuel,

    You can place any element to the bottom by just adding this

    css to any of your classes or id's. //CSS
    {
    position:absolute;
    width:100%;
    bottom:0px;
    }
    //Practical Usage
    <html>
    <head>
        <style type="text/css">
           .footer{
               position:absolute;
               width:100%;
               bottom:0px;
               }
        </style>
    </head>
    <body>
    <table class="footer">
    <td>Footer Goes Here</td>
    </table>
        </body>
    </html>

      Modified On Mar-31-2018 02:02:17 AM

Answer