PDA

View Full Version : DIV(contentEditable) not sustaining dimensions


Zvona
09-02-2002, 01:49 PM
I have a DIV with editable content and fixed width and height defined with CSS. When I append content into DIV element, it spreads instead of keeping shape.

Edit :
Now I've got that dimensions stays fixed. However, I'd also want that line breaks in DIV when it's exceeded.

Problem solved.

Whole editable area for IE :
<div id="theEditor" contentEditable="true" style="width:400px;height:250px;background-color:#E0E8EC;overflow:auto;word-wrap:break-word;"></div>

Leaving this message if someone has additional information or decent ideas about the topic.

Quiet Storm
09-02-2002, 11:18 PM
I usually use this:

[color=red]

<DIV contenteditable onkeypress="return (this.innerText.length <= 20)">
12345678901234567890</DIV>