Forum Moderators: open

Message Too Old, No Replies

WYSIWYG <textarea>

how to make list break line properly

         

Morrison

12:18 pm on May 13, 2002 (gmt 0)

10+ Year Member



Hi,

I using WYSIWYG <textarea> to update my DB.

when i'm writing a list it makes it:


1.1 this is line number one...
and the continue of line number one.
1.2 this is line number two...
and the continue of line number two.

instead of:

1.1 this is line number one...
....and the continue of line number one.
1.2 this is line number two...
....and the continue of line number two.

( the second line starts under the numbers and not under the text like it should)
does anyone know how to fix it?

thanx in advance

Morrison.

moonbiter

1:56 pm on May 13, 2002 (gmt 0)

10+ Year Member



I am making two big assumptions here:

1) You are asking about rendering output.
2) You are not outputting the data as an HTML ordered list (i.e. <ol><li></li></ol>).

One way you can fake a list style indentation with CSS is:

<html>
<head>
<title>Non-list list</title>
<style type="text/css">
.list {
margin-left: 2em;
}
.list:first-line {
margin-left: -2em;
}
</style>
</head>
<body>
<p class="list">1.1 this is line number one...<br />
and the continue of line number one.</p>
<p class="list">1.2 this is line number two...<br />
and the continue of line number two. </p>
</body>
</html>

Which works in Mozilla, but unfortunately IE doesn't do margin manipulation on the first-line pseudo-element.

Since it is likely that IE is the platform you are targeting, this bit of advice is probably only marginally helpful. ...

Morrison

3:26 pm on May 13, 2002 (gmt 0)

10+ Year Member



thanx for your advice, Moonbiter, but it is the IE that i'm builing this site for. :)

I did find a way to do it, it's not what i meant, but it work for me.

so in case somebody will want to do the same thing, u can do it simply by writing the text in WORD, and copy/paste it to the WYSIWYG <textarea>, and it will paste it exaxly in the same layout it was in the WORD document.

Morrison.

caine

3:31 pm on May 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thats probably because word uses embedded style sheets to control everything