I am writing a validator for \"visual correctness\" of html files. The goal is to detect too wide elements.
Here is a demo of my problem.
The do
scrollWidth will do it:
$("#two").get()[0].scrollWidth or getElementById("two").scrollWidth
this outputs 212px, the real width you are looking for.