'screen.height' excluding browser bottom border?

Discussion in 'HTML' started by asnowfall@gmail.com, Feb 25, 2006.

  1. Guest

    '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
     
    , Feb 25, 2006
    #1
    1. Advertising

  2. Toby Inkster Guest

    asnowfall wrote:

    > 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

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Feb 25, 2006
    #2
    1. Advertising

  3. Guest

    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
     
    , Feb 25, 2006
    #3
  4. Chris Beall Guest

    wrote:
    > 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
     
    Chris Beall, Feb 26, 2006
    #4
  5. Jose Guest

    > I want to maintain the distance between <IMG-last> & 'copyright' label
    > 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
    --
    Money: what you need when you run out of brains.
    for Email, make the obvious change in the address.
     
    Jose, Feb 26, 2006
    #5
  6. Toby Inkster Guest

    Chris Beall wrote:

    > 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.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Feb 26, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    347
    Raymond DeCampo
    Feb 25, 2006
  2. Noozer
    Replies:
    1
    Views:
    7,225
    Carolyn Marenger
    Mar 13, 2006
  3. phl
    Replies:
    1
    Views:
    4,385
    Martin Jay
    Jun 8, 2006
  4. Biranchi Narayan Panda
    Replies:
    1
    Views:
    2,802
    Alexey Smirnov
    Feb 17, 2010
  5. john T
    Replies:
    7
    Views:
    239
    Richard Formby
    Feb 19, 2004
Loading...

Share This Page