Sunday, 15 July 2012

javascript - .appendTo Makes text overflow outside of div? -



javascript - .appendTo Makes text overflow outside of div? -

i'm working on need append text div div, fine , have done this, problem when div moved, create text overflow if there no width (just 1 big long string of text overflowing out of div) div still keeping width.

<script> jquery(document).ready(function() { $(".item-content").appendto(".tp-fade"); }); </script>

the code above, moved below div class of .tp-fade

<div class="item-content"> lorem ipsum... </div>

but when move text seems ignore <div>s width.

edit:

apologies. stupid error on part. turns out .tp-fade has sneaky white-space: nowrap hidden away , when removed it; fixed issue.

thanks.

javascript jquery html css

No comments:

Post a Comment