Jump to content

Search the Community

Showing results for tags 'offsetHeight'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. <html><head><script type="text/javascript"> function showPosition() { var oElement = document.all.oCell; var myDiv = document.all.myDiv; alert("The span element is at (" + oElement.offsetLeft + "," + oElement.offsetTop + ")n" + "The offset parent is " + oElement.offsetParent.tagName + " offsetHeight is " + oElement.clientHeight); } </script></head><body onload="showPosition()"><div id = "myDiv" style = "width: 100px; padding: 10px 20px; position: relative; border: 1px solid black;float: right;"> <span id="oCell">This is a small table.</span> </div></body></html> Hi guys, I was messing around with the offsetSomething and clientHeight properties(experimenting with them actually), I noticed that clientHeight always returned "0" on that span element, when I changed to offsetHeight, it returned a value other than "0", BUT when set "style = 'display:block' " on that <span> element, clientHeight returned some value other than "0", and everytime I removed "style = 'display: block;' ", clientHeight returned "0", so clientHeight property only works on block-level elements or am I doing something wrong here? Thank you in advance guys.
×
×
  • Create New...