How do I manipulate this content-editable div in such a way?
-
I have a content-ediable div that I am going to use as a text input field. I want to set its height but I run into a problem when doing that: When pressing "Enter" to scroll down the content-editable div (just as you would do in Quora's textboxes) the cursor goes passes the element's height and goes into the body. The div doesn't expand along with it. Why does Quora's content-editable divs do that without the same problem happening? border: 1px solid #000; outline: none; width: 35em; height: 30em; <div id="_dev4232_generator__" contenteditable="true"></div>
-
Answer:
Please try to change your css height property to min-height for example: border: 1px solid #000;outline: none;width: 35em;min-height: 30em; I posted a jsfiddle with an example here: http://jsfiddle.net/mkuklis/zFzQe/14/
Michal Kuklis at Quora Visit the source
Related Q & A:
- How do I manipulate a large number of moving platforms?Best solution by Electrical Engineering
- How do I set the first and last frame of a video to be an image?Best solution by stackoverflow.com
- How do I change HTML content to be a JS variable?Best solution by ehow.com
- How do I hook up an external hard drive to a DVR?Best solution by Yahoo! Answers
- How do I access my e-mail in Outlook from a different computer?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.