Jquery, get div width when overflow: hidden;
Posted
by Fabio
on Stack Overflow
See other posts from Stack Overflow
or by Fabio
Published on 2010-06-16T19:16:55Z
Indexed on
2010/06/16
19:22 UTC
Read the original article
Hit count: 345
Hello all. How can I get a div width when the div is inside another div with "overflow: hidden;" ?
I tried to set overflow as auto and after using $("#divselector").width() but I always get the parent div width!
Ex:
html:
<div id="content">
<div id="item">content content content ...</div>
</div>
css:
#content
{
width: 760px;
height: 100%;
overflow: hidden;
display: block;
position: relative;
cursor: move;
}
© Stack Overflow or respective owner