Tag Archives: Hack

Keeping footer always at the Bottom of the Page

In a recent website work I had to keep footer always at the bottom regardless of the content. If there is no content or very less content then footer use to come up instead of sticking at bottom of the page. Here is the CSS solution I found for the same:

Lets say the page structure is something like this:

<div id="page">
 <div id="header">HEADER</div>
 <div id="content">CONTENT</div>
 <div id="footer">FOOTER</div>

Then we just need to use the following CSS code for footer which we need to keep in head section or some CSS file which will linked in head section:

 padding-bottom:40px;   /* Height of the footer */
 height:40px;   /* Height of the footer */

and we are done. Just test in any browser 🙂

This can be quite easily done without using any CSS if we are using <table> tag with height attribute instead of <div> tag. for e.g.

 <table width="100%" height="100%">
 <tr><td valign="top">HEADER</td></tr>
 <tr><td valign="middle">CONTENT</td></tr>
 <tr><td valign="bottom">FOOTER</td></tr>

Here table height is set to 100% to use whole page and valign is used for vertical alignment of .  height attribute can be avoided using style element.

This will work fantastic but might fail in W3C validation as height attribute is no more supported so better use the solution with <div> tag with CSS.

Note: I tested this in Chrome browser only.

Have Fun 😉

Restore Show Desktop Shortcut

I accidentally lost shortcut button “Show Desktop” from Windows XP Taskbar’s Quick Launch section. I tried various probabilities and combination but couldn’t restore it. Though Windows+D command was handy but I wanted my shortcut button back. Finally after some googling got a simple solution …

Create a file with name “Show Desktop.scf” with following contents:

Drag this file to Quick Launch area and it works.

Another simple way:
click Start>Run and type this command: regsvr32 /n /i:U shell32 and done.

Hide that Navigation Bar of Blogspot Blog

I never felt the need of navigation bar which always get appear with all the blogspot blog. Finally I found some cool ways (say hacks) to hide this nav bar from any blogspot blog by just adding few CSS line.

To start with list of different solutions, I will first suggest my own hack. Here is the cool one line solution by me which will work with new Blogger template.

/* Deep C Solution: http://ursdeep.blogspot.com
———————————————– */
#navbar-iframe { height: 0px; }

Just add above line in your blogger template in CSS style section inside head tag. This will simply reduce the size of nav bar to 0(zero) pixel and it won’t be visible anymore.

Now here is the list of other solutions suggested by different bloggers. I also tried these solutions which are working fine to hide nav bar from the blogspot blog.

Here is the first solution as suggested by Amit Agarwal in his blog :
Add this code anywhere in the blog template within style tag:

This blog also suggest one more solution as:
/* By Aditya http://the-lastword.blogspot.com/
———————————————– */
div.navbar {

Another solution as suggested by Praveen in his blog :

/* Apnerve hack code
more info @: http://www.apnerve.blogspot.com
———————————————– */
#navbar #Navbar1 iframe{

or try this CSS code:

display:none !important;

Now final word: I am not sure if its legal or not to hide that nav bar from the blogspot blog.

If you know any other solution to do same functionality of hiding the nav bar then do aware me also.