Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 568
  • Last Modified:

text area overlapping

I have a fixed length text area and and a fixed positioned div.
When I add lengthy content to the text area, some of the characters of the content overlap with the div.
With JS can I get if some part of the content overlap with the div?

Thank you
0
myyis
Asked:
myyis
  • 4
  • 4
1 Solution
 
ravikantninaveCommented:
user overflow:hidden;
0
 
GaryCommented:
Why are you using position:fixed?
Show us some code/css
0
 
myyisAuthor Commented:
Note that the fixed div is placed far right side.
So if add a vertical content to the textarea it does not overlap, If I add a long sentence it overlaps to the div.
I want a js alert if overlaps while editing the textarea.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
myyisAuthor Commented:
I don't have a code yet.  The div is fixed because I need them overlapped
0
 
GaryCommented:
What css do you have on the textarea? A textarea will normally wrap, it won't keep getting wider
How does your code differ from this
http://jsfiddle.net/beDTt/
0
 
myyisAuthor Commented:
add "width:800px;"  to text area
0
 
GaryCommented:
Why would I/You want to force the textarea to go behind another element - that is a serious design flaw.
0
 
myyisAuthor Commented:
I need them overlapped for a specific purpose, and I  need a JS alert if  the content overlaps the div.
0
 
GaryCommented:
It isn't possible to get the width of the text in a textarea
You need to rethink your design.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now