how high is a page?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Merlin

    how high is a page?

    Hi there,

    I am wondering if there is a solution with JS to find out how high a page is.
    How many pixels. Depending on how much content is on each dynamic site, I would
    like to place other content on another row.

    Thank you for any hint,

    Merlin

  • kaeli

    #2
    Re: how high is a page?

    In article <2l09vjF73lf5U1 @uni-berlin.de>, news.groups@gmx .de
    enlightened us with...[color=blue]
    > Hi there,
    >
    > I am wondering if there is a solution with JS to find out how high a page is.
    > How many pixels. Depending on how much content is on each dynamic site, I would
    > like to place other content on another row.
    >[/color]


    Wow. All your users have the same screen resolution? Neat.

    ;)

    [You should really use percents, not pixels. Good coding negates the
    need to do this sort of check at all.]

    --
    --
    ~kaeli~
    A lot of money is tainted - It taint yours and it taint mine.



    Comment

    • Java  script  Dude

      #3
      Re: how high is a page?

      > I am wondering if there is a solution with JS to find out how high a page is.[color=blue]
      > How many pixels. Depending on how much content is on each dynamic site, I would
      > like to place other content on another row.[/color]

      There is a way to do this but it is highly innacurate. If you use
      padding styles anywhere within the range you are measuring, those
      padding distances are ignored. As such, you can only use margins when
      working needing to get a more accurate measurement of the rendered
      height or width of a DOM Elem.

      To get the height of an object `o` use o.offsetHeight, for the width
      use o.offsetWidth. For measuring the window size, in IE use
      document.body.c lientHeight & document.body.c lientWidth in Moz use
      window.innerHei ght & window.innerWid th.

      I know these properties work with IE and Moz but have not tested on
      anything other browsers.

      Good luck!

      JsD

      Comment

      • Mike Foster

        #4
        Re: how high is a page?

        Merlin wrote:
        [color=blue]
        > I am wondering if there is a solution with JS to find out how high a page is.
        > How many pixels. Depending on how much content is on each dynamic site, I would
        > like to place other content on another row.[/color]

        Try the following page with different browsers. Perhaps it will be helpful.
        <URL: http://cross-browser.com/x/test/clientheight.ht ml>



        Comment

        Working...