Solved

text area overlapping

Posted on 2014-02-02
9
433 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
  • 4
  • 4
9 Comments
 
LVL 4

Expert Comment

by:ravikantninave
Comment Utility
user overflow:hidden;
0
 
LVL 58

Expert Comment

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

Author Comment

by:myyis
Comment Utility
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
 

Author Comment

by:myyis
Comment Utility
I don't have a code yet.  The div is fixed because I need them overlapped
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 58

Expert Comment

by:Gary
Comment Utility
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
Comment Utility
add "width:800px;"  to text area
0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
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
Comment Utility
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
Comment Utility
It isn't possible to get the width of the text in a textarea
You need to rethink your design.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now