offsetHeight vs style.height

Discussion in 'JavaScript' started by chopficaro, Apr 10, 2010.

  1. #1
    it seems whenever i want to get the value i have to use offsetHeight, and whenever i want to set the value i have to use style.height. this is confusing because offsetHeight includes borders and padding and style.height does not. why cant i set offsetHeight?
     
    chopficaro, Apr 10, 2010 IP
  2. chopficaro

    chopficaro Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ok so offsetHeight is read only. but style seems write only! how do i get the current values for the border and padding so i can reliably make adjustments?
     
    chopficaro, Apr 10, 2010 IP