Ad goes here

Thursday, 29 November 2012

CSS Fixed/ Footer

We all developers/designers are tried to use fixed footer for our website/application and most of them got content overlapping problem. But today I will give you some tips, where you can simply use fixed footer with a few lines of CSS and surly it will work on all leading browsers.

How it will work on browsers:
The footer always will be visible at the end of the browser even you use a single line of content or view it on any resolution. You never face content overlapping issue on maximum page content.


CSS:
Add following css to your stylesheet.

* {
margin: 0;
}
html, body {
height: 100%;
}
.main-content-area {
min-height: 100%;
height: auto !important;
height: 100%;
}
form {height:100%} /* for ASP.NET project only */
.footer, .fixedfooter {
height: 120px;
}
.footer { height:120px;}

CSS Note: Please use equal height for .footer and .fixedfooter class.

HTML:
<html>

<head>

<link rel="stylesheet" type=”text/css” href="yourstylesheet.css" />

</head>

<body>

<div class=" main-content-area ">

Website Content

<div class=" fixedfooter "></div> <! - - Blank fixed footer area -- >

</div> <!-- main-content-area end here --> 

<div class="footer"> <!—footer will be in separate area -- >

Footer Content

</div>

</body>

</html>
HTML Note: Content area and footer area will be in separate div and the fixedfooter div will be place just before the end of the main-content-area div.

18 comments:

  1. When utilizing the Java Script or CSS3 alongside HTML5, Web Developers can without much of a stretch work with the Geolocation APIs, Application Storage, Canvas, Web Sockets and so forth.javascript query string

    ReplyDelete
    Replies
    1. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Project Centers in Chennai.

      Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

      Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully

      Delete
  2. I just thought it may be an idea to post incase anyone else was having problems researching but I am a little unsure if I am allowed to put names and addresses on here.
    www.freesitemaker.net

    ReplyDelete
  3. The footer always will be visible at the end of the browser even you use a single line of content or view it on any resolution. You never face content overlapping issue on maximum page content. 1z0-1038 dumps

    ReplyDelete
  4. In case you're prepared to go through a tad of cash, do a great deal of repetitive work, take some analysis, and do a ton of self-advancement, at that point web design might be the field for you.Webdesign

    ReplyDelete
  5. Glad to be one of several visitants on this amazing web site : D. new york web design company

    ReplyDelete
  6. Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently quickly. nyc web designer

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. This is such a great resource that you’re offering and you provide out at no cost. I appreciate seeing sites that realize the worth of offering a perfect useful resource totally free. I genuinely loved reading your submit. website designer nyc

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Nice post. I be taught one thing more challenging on totally different blogs everyday. It will all the time be stimulating to learn content from other writers and apply slightly one thing from their store. I’d desire to use some with the content on my blog whether you don’t mind. Natually I’ll give you a hyperlink on your net blog. Thanks for sharing. branding agencies in san francisco

    ReplyDelete
  11. Giving you the best News is very much imptortant to us. best branding agencies san francisco

    ReplyDelete
  12. Thank you for sharing excellent informations. Your site is so cool. I’m impressed by the details that you?ve on this website. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched all over the place and just could not come across. What a perfect website. branding agency san francisco

    ReplyDelete
  13. Some times its a pain in the ass to read what blog owners wrote but this site is very user friendly ! . design agency san francisco

    ReplyDelete
  14. Good post. I be taught one thing more challenging on completely different blogs everyday. It is going to always be stimulating to read content material from other writers and apply a little something from their store. I’d want to use some with the content on my blog whether or not you don’t mind. Natually I’ll offer you a link in your web blog. Thanks for sharing. ui design agency san francisco

    ReplyDelete
  15. New York Travel Tips… [...]below you’ll find the link to some sites that we think you should visit[...]… design agency san francisco

    ReplyDelete
  16. I really appreciate this post. I¡¦ve been looking everywhere for this! Thank goodness I found it on Bing. You've made my day! Thanks again mobile phone mockup

    ReplyDelete
  17. I am usually to blogging and i also actually appreciate your website content continuously. Your content has really peaks my interest. I’m going to bookmark your blog and maintain checking for new data. ipad device template

    ReplyDelete