Mihir
Mihir

Reputation: 8734

How to find status bar of a browser is appearing or not through jquery

I am trying to create a small site. For that i designed some layout. Every thing is fine except the height. I am giving the main div height as the height of the document with $(document).height(). Because of the status bar, i have to reduce the 2pixels from the resultant height. In IE9 looking good. But when I open same in the Firefox there is some gap at the bottom. Browsers are looking like this.

enter image description here enter image description here

Now I want to adjust the height based on the visibility of the status bar which is presented at the bottom of the IE browser. How to find it is visible or not through jquery

Upvotes: 0

Views: 118

Answers (1)

Kami
Kami

Reputation: 19407

I do not think this is possible - but feel free to prove me wrong. On a side note status bar is not the only thing that can appear at the bottom; I have several addon that add additional status notifications that pop in/out as the page loads, so attempting to determine if the status bar is visible or not may not be the best approach.

Each user will also have different size screen/resolution, so, you can expect different size view windows.

With that in mind have you considered setting the div to have the following

position:absolute;
top:0; right:0;
bottom:10px; left:0;

This will ensure the div is the size of the screen minus a few pixels from the bottom.

Upvotes: 1

Related Questions