Note that you might probably want to set some default width for the div (e.g. to 50) so as to avoid false positives (true with whichever technique you use).