I am trying to create a simple border in Javascript and should get the full width of the contents of innerDIV in the following:
<div id="container" style="width: 100%; overflow: hidden;">
<div id="innerDiv" style="direction: rtl; white-space: nowrap; overflow: visible; position: relative;">
very long ... text
</div>
</div>
I tried scrollWidth . It works fine in Chrome , but not in Firefox (where clientWidth is specified instead).
Here is a live demo: http://jsfiddle.net/5fPGy/3/ (try it in Chrome and Firefox)
Does anyone know why? and how to get this full width?
Thanks in advance.
Orion source
share