>I have a list where the text in a list item may or may not wrap
>depending on how wide is the user's window. I want any text that does
>wrap to be indented by an amount I can define/change. Here is an
>example of why:
>
>say I have the <li>'s text like this:
>.................HeadLine1 - now for some long-winded Subead1 about
>that
>
>I want it that in case the user's window is to narrow to keep all of
>that on one line, then my css will effectively wrap it like this:
>.................HeadLine1 - now for some long-winded Subead1 about
>that
>
>and NOT like this:
>.................HeadLine1 - now for some long-winded Subead1 about
>that
>
>This is a breeze with two adjacent table cells in the same row... the
>first w/right alignment and the second w/left alignment. But I want
>to do it w/css to get off my old <table> dependence.
>
>Would your css suggestion be the same for any <div>'s text the same as
>a <li>'s? I need to do this in both elements.
Take a look at the text-indent property of CSS. It will indent
the first line of an element (li, div, whatever) by your desired
amount. In order to achieve what you want, you can use a
negative measurement for the indentation:
li {text-indent: -50px;}
This will extend the text leftward by 50px rather than indenting
it. You will likely need to compensate for this by giving the
<li> some left-padding. Experiment with different values.
Hope I understood what you were asking for.
Ken
--
Simple Lives Web Design
http://simplelives.com