'screen.height' excluding browser bottom border?

A

asnowfall

'screen.height' gives screen resolution.

Is there a property to give 'screen.height' after subtracting the
height of browser's bottom border(on which tooltips are displayed );

Thanks
Ramesh
 
T

Toby Inkster

asnowfall said:
Is there a property to give 'screen.height' after subtracting the
height of browser's bottom border(on which tooltips are displayed );

The term you're after is "status bar", not "bottom border".

Firstly, there are plenty of other things you need to subtract if you want
to find out the available space you have: e.g. toolbars, browser title
bar, and you have to take into account the fact that many people (40-50%)
do not surf with their browser window maximised.

Secondly, once you have this information, you're probably going to try to
do something stupid with it. (Most people who do ask this soft of question
do something stupid.) Please post a message explaining why you want this
information, and we'll tell you why it's stupid.

Finally, if you want to ignore my warnings, you probably want the first
code segment on this page:
http://www.quirksmode.org/viewport/compatibility.html
 
A

asnowfall

Here is rought layout of my page

*******menu****
<IMG>
<IMG>
<IMG-last>



*****copyright****

Where 'Tx' standd for <mage.
I want to maintain the distance between <IMG-last> & 'copyright' label
constant; even when window is resized(i,e with presence of scroll
bars). I do not like 'copyright' label to appear right under the
(T5,56).

Thanks for your response..
Ramesh
 
C

Chris Beall

Here is rought layout of my page

*******menu****
<IMG>
<IMG>
<IMG-last>



*****copyright****

Where 'Tx' standd for <mage.
I want to maintain the distance between <IMG-last> & 'copyright' label
constant; even when window is resized(i,e with presence of scroll
bars). I do not like 'copyright' label to appear right under the
(T5,56).

Thanks for your response..
Ramesh

Ramesh,

Non-technical answer: In the US, it is no longer necessary to place a
copyright symbol on your work in order to protect it. It doesn't do any
harm, but it doesn't really do any good either. Since the copyright
will take up space, and since your requirement for a gap between it and
the final image will also take up space, the easiest solution to your
problem is to drop the copyright.

Technical answer:
- If you DID extract the screen height, what would you do with it?
First, to get the screen height, you need JavaScript, which will not
always be available on the client system. If it isn't available, what
will you do? Once you figure that out, then do that thing all the time
and forget about screen height.
- The best technical solution is to position the copyright at the
bottom of the viewport and give it a top margin large enough to satisfy
your eye. Something like:

HTML:
<div class="copyright">
<p>Images, HTML, and CSS Copyright 2006 by Ramesh</p>
</div>

CSS:
div.copyright { position: relative ;/* Establish 'positioned' ancestor */
text-align: center ; /* Center the contained text */
}
div.copyright p {
color: black ; /* Must specify colors */
background-color: white ; /* otherwise transparent! */
position: fixed ; /* position relative to window */
bottom: 0 ; /* against the window bottom */
left: 0 ; /* Stretch to go clear */
right: 0 ; /* across viewport */

margin-bottom: 0 ; /* Adjust to suit */
padding-top: 20px ; /* with a nice top padding */
}

In addition, since the copyright now covers some of the bottom of the
window, you will need to put a bottom padding or margin on the lowest
thing on the page, otherwise it will be hidden behind the copyright.

The above was tested on Opera and Netscape 7.1, which means Firefox
should work. Unfortunately, IE 6 does not honor position: fixed, so it
just puts the copyright at the bottom of the page and does not lock it
to the window. Perhaps IE 7? Or perhaps users will abandon IE for
something more functional...

Chris Beall
 
J

Jose

I want to maintain the distance between said:
constant; even when window is resized(i,e with presence of scroll
bars).

How about putting a transparent spacer image between the last image and
the copyright notice?

Jose
 
T

Toby Inkster

Chris said:
IE 6 does not honor position: fixed, so it just puts the copyright at
the bottom of the page and does not lock it to the window. Perhaps IE 7?

Yes - IE 7 does/will.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top