i want to put the position of inner div with using:
<div id="outerdiv">
<div id="innerdiv1" style="position:absolute;width:30px;"
<div id="innerdiv2" style="position:absolute;left:20px;"
The problem is width of innerdiv1 can be changed dynamically, i want that div2 is near to div1, i calculate its position using outerdiv1.left + innerdiv1.innerwidth, but there is always some offset and innerdiv2 is not exactly put to innerdiv1? What can be the reason?
try using component.outerWidth instead of component.width, it will give the exact result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With