«« Next » « Previous
«« Next » « Previous

Link Details

That link needs one more vote. Make it yours! Login and vote now.
Link 72918 thumbnail

By mmurph211
via matts411.com
Submitted: Mar 27 2008 / 07:35

The following are two similiar functions you may find useful. When called on an element, they can return (in pixels) either: * The width/height * The width/height including padding * The width/height including borders * The width/height including padding and borders (basically offsetWidth/offsetHeight) The functions work on any (block?) element, regardless of whether or not it has a predefined width/height. They've been tested in Internet Explorer 6 & 7, Firefox, Safari and Opera.
  • 1
  • 0
  • 126
  • 6

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (1)



Voters Against This Link (0)