Solved

text area overlapping

Posted on 2014-02-02
9
482 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
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
html input 8 44
Troubles viewing HTML in Outlook 2010 client 3 30
Explain this javascript function to me 2 29
jQuery Datatables.js Selecting a Row to get ID 5 25
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
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).

821 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