Solved

text area overlapping

Posted on 2014-02-02
9
502 Views
Last Modified: 2014-02-06
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
Comment
Question by:myyis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 4

Expert Comment

by:ravikantninave
ID: 39828061
user overflow:hidden;
0
 
LVL 58

Expert Comment

by:Gary
ID: 39828069
Why are you using position:fixed?
Show us some code/css
0
 

Author Comment

by:myyis
ID: 39828071
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:myyis
ID: 39828076
I don't have a code yet.  The div is fixed because I need them overlapped
0
 
LVL 58

Expert Comment

by:Gary
ID: 39828089
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
 

Author Comment

by:myyis
ID: 39828128
add "width:800px;"  to text area
0
 
LVL 58

Expert Comment

by:Gary
ID: 39828143
Why would I/You want to force the textarea to go behind another element - that is a serious design flaw.
0
 

Author Comment

by:myyis
ID: 39828159
I need them overlapped for a specific purpose, and I  need a JS alert if  the content overlaps the div.
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39828172
It isn't possible to get the width of the text in a textarea
You need to rethink your design.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question