Forum Moderators: not2easy

Message Too Old, No Replies

How to indent wrapped lines?

         

ihorko

2:58 pm on Jul 31, 2009 (gmt 0)

10+ Year Member



Hello!

I have some text in span tag, in browser it shows like:

You may now proceed to edit your Profile in order to fill in additional personal
details about yourself, or you could modify your Options to customize your
browsing experience of this site. If you would rather do these things later,
you can do so by following the links around the site to your User Control
Panel.

but I need add some style to show it like:

You may now proceed to edit your Profile in order to fill in additional personal
[spaces here] details about yourself, or you could modify your Options to customize your
[spaces here] browsing experience of this site. If you would rather do these things later,
[spaces here] you can do so by following the links around the site to your User Control
[spaces here] Panel.

So, all text should be in one span, first line of text shoulb be in left but all next lines should have an intend (replace [spaces here] with spaces (intend)) ?

Thank you!

swa66

7:26 pm on Jul 31, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



text-indent works on the first line. so a combo of putting the margin for all lines and then moving the first line back would create the hanging effect you seek.

e.g.:


p {
text-indent: -3em;
margin-left: 3em;
}

In CSS3 this is likely to become easier with the introduction of something like

"text-indent: 3em hanging;"
, but that's for the future browsers.

ihorko

10:27 am on Aug 3, 2009 (gmt 0)

10+ Year Member



Thanks a lot, it works!