Actual Div Size

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

    #1

    Actual Div Size

    Actual Div Size
    ===============

    How can I determin the actaul size of a Div?

    The style properties of a Div determin the minimum size of the Div Box.
    But the Size can be larger depending on the content of the Div.

    How can I determin the actual size (real size) of a Div Box?

    Thanks
    Alexander
  • Vjekoslav Begovic

    #2
    Re: Actual Div Size

    "Alexander" <alexander.keys selitz@freenet. de> wrote:
    [color=blue]
    > How can I determin the actaul size of a Div?[/color]

    document.getEle mentById("myDiv ").offestHe ight
    document.getEle mentById("myDiv ").offestWi dth


    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Actual Div Size

      Vjekoslav Begovic wrote:
      [color=blue]
      > "Alexander" <alexander.keys selitz@freenet. de> wrote:[color=green]
      >> How can I determin the actaul size of a Div?[/color]
      >
      > document.getEle mentById("myDiv ").offestHe ight[/color]
      ^^^^^^[color=blue]
      > document.getEle mentById("myDiv ").offestWi dth[/color]
      ^^^^^^
      Typo.

      offsetHeight
      offsetWidth

      These are proprietary properties, do not expect them
      to be supported, so check them before accessing them.

      if (...offsetHeigh t)
      {
      ...
      }


      PointedEars

      Comment

      Working...