|
Posted by Web Team @ Borough of Poole on September 28, 2005, 2:51 am
Please log in for more thread options
Hi All,
I'm trying to stop text from wrapping in a span, so that my users can
enter content with out the box stretching across the screen when they
reach the edge of it, and with out horizontal scroll bars appearing.
Basically replicating notepad with word wrap switched on.
Maybe this isnt possible?
Any help will be much appreciated.
Simon.
--
Heres my code so far:
show/hide quoted text
<html>
<head>
<style>
.editorspan{
position: relative;
height:200px;
width:200px;
overflow-y : none;
overflow-x : none;
border: 4px groove #D3D3D3;
background-color : white ;
background:white;
}
show/hide quoted text
</style>
</head>
<body>
<div CONTENTEDITABLE class="editorspan"></div>
</body>
</html>
|
|
Posted by Leif K-Brooks on September 29, 2005, 4:04 am
Please log in for more thread options
Web Team @ Borough of Poole wrote:
show/hide quoted text
> <div CONTENTEDITABLE [...]
Do you have a question about Web authoring?
|
|
Posted by Web Team @ Borough of Poole on September 30, 2005, 11:39 pm
Please log in for more thread options
Yes, please see my original post.
Thanks.
|
|
Posted by Rincewind on October 1, 2005, 9:34 am
Please log in for more thread options
On 28 Sep 2005 02:51:59 -0700, Web Team @ Borough of Poole wrote:
show/hide quoted text
> I'm trying to stop text from wrapping in a span, so that my users can
> enter content with out the box stretching across the screen when they
> reach the edge of it, and with out horizontal scroll bars appearing.
> Basically replicating notepad with word wrap switched on.
>
> Maybe this isnt possible?
>
> Any help will be much appreciated.
>
> Simon.
>
> --
>
> Heres my code so far:
>
> .editorspan{
> position: relative;
> height:200px;
> width:200px;
> overflow-y : none;
> overflow-x : none;
> border: 4px groove #D3D3D3;
> background-color : white ;
> background:white;
> }
What is the question, the code you have given is at odds with the question,
show/hide quoted text
and the question is as vague as fog as well as being contradictory.<quote>
I'm trying to stop text from wrapping in a span</quote> and
<quote>replicating notepad with word wrap switched on</quote> are polar
opposites.
The code is for a box 200x200 not an input field, I suggest you clarify the
question.
|
|
Posted by Web Team @ Borough of Poole on October 6, 2005, 6:00 am
Please log in for more thread options
Ok, my mistake, I'm actually trying to make text WRAP in a span, the
same way that notepad does when word wrap is on.
Irrelevant. you'll notice that my div has a CONTENTEDITABLE attribute,
which makes it editable by the user.
Since my first post I have noticed that this is only a problem if the
user types a string of text with no spaces in, in which case the div
either stretches across the page, or gives horizontal scroll bar,
depending on the overflow-x value. If the user is typing as normal (e.g
word after word!) then the wrapping occurs as expected.
Thanks,
Simon.
|
| Similar Threads | Posted | | URGENT HELP: Text wrapping inside DIV. | March 6, 2006, 11:25 pm |
| Preformatted text and line wrapping | July 6, 2006, 2:22 pm |
| Truncating text in a table rather than wrapping to a new line? | March 21, 2007, 5:07 pm |
tag not wrapping | January 13, 2007, 10:06 pm |
| Wrapping an Image! | March 27, 2007, 7:57 am |
| Example of DIV wrapping problem | February 29, 2008, 10:37 pm |
| Does caps in table cause none wrapping | May 2, 2008, 3:40 am |
| FF and IE with span | February 6, 2007, 1:46 pm |
| a name vs. span id? | May 26, 2008, 2:27 pm |
| problem with | April 28, 2005, 12:23 am |
|
<head>
<style>