it's not working correctly becuase your html is way off. youve got the html for an entire html docuiment inside of a div, your confusing your script. \
( it's actually doing what you are telling it to do based on you r html in the jsbin example)
- side note, you are using the html5 doc type, but you are using tags like FONT that were deprecated years ago.