• When using ordered lists, I often like to have multiple paragraphs in each numbered item and set them up like this:

    1. This is the time for all good men to come to the aid of their country. This is the time.
    2. Now is the time for all good men to come together. (This is the “multiple paragraph” within list item 1.)

    3. I hope you can help me with this…

    This works—almost. But when I publish something similar to the above example, the second paragraph of the first item, “Now is the time…” indents to my style guide’s default for new paragraphs. What I want, however, is to make the second paragraph flush-right with the numbered paragraph above.

    Is there an easy way to do this?
    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator cubecolour

    (@numeeja)

    A workaround could be to put each paragraph into a span, and style the ol span accordingly. ie display : block & a bit of margin-bottom

    Thread Starter hchewning

    (@hchewning)

    Thanks for the quick response but I’m not understanding the suggestion.
    Is this something I can enter in the post or an addition to the style guide?

    I’m an end user not a developer and don’t know the meaning of “span.” And it’s not in my HTML or WordPress for Dummies books so I’m lost.

    Thanks.

    Moderator cubecolour

    (@numeeja)

    Actually I think I misunderstood what your problem was – disregard the span stuff – paragraph tags are allowed inside list items and should display correctly in most themes

    All you should need to do is switch your post editor to html mode and enter the list and contents like:

    <ul>
    <li>list item one</li>
    <li>
    <p>list item two paragraph one</p>
    <p>list item two paragraph two</p>
    <p>list item two paragraph three</p>
    </li>
    </ul>

    Thread Starter hchewning

    (@hchewning)

    This suggestion gives me the same effect I had before. I believe my problem is the result of my Style Sheet which calls for new paragraphs to be indented–and I want to maintain this. So with the above, each of the “sub-paragraphs” under each
    <li> indents 5 spaces to the right rather than be flush left with the original list entry.

    I’m hoping to find a way to override the style sheet specification without having to go into the Style Sheet and make changes each time I want to show multiple entries in a listing. (My experience with WordPress is as an end user so I’m competent at posting new entries but not confident with missing with the Style Sheet.)

    Any way to force these sub-paragraphs flush left without changing the style sheet? Suggestions? Maybe an entry to the Style Sheet that would only apply to these multiple paragraph listings but still allow new paragraphs in the text to indent? (Is there a proper term for these multiple paragraph list entries??)

    Thanks again.

    add a css rule that targets the <p> tags inside the <li> tags…

    something like so…

    li p { margin-left:0; }

    or whatever you need to left it based on what your existing css does.

    I have this same need. The <p>paragraph text</p> approach works great. So does </br></br>paragraph text</br></br>, but all of these tags are stripped out of the post after you switch back and forth between HDML view and Visual view and/or save the post once or twice. The result is that these fixes become temporary.

    I tried adding li p { margin-left:0; } to my Theme CSS file but it still removes these tags.

    What do you have to do to get these “foreign” tags to stick permanently?

    Thanks.

    Try other types of lists and just stay in HTML mode…if you have to see the post before publish use the preview but save first (when in HTML mode)…then review the real issue, such as a theme or plugin issue.

    Lists can be properly combined…also one need not start with ul or ol.

    An unordered list example:

    <ul class="new1">
    <li class="new1"><stuff></li>
    <dt class="new1"><stuff></dt>
    </ul>

    or, some items using the elements li, dt and p :

    <li class="new1"><stuff></li>
    <dt class="new1"><stuff></dt>
    <p> class="new1"<stuff></p>

    Last line in above should be:

    <p class="new1"><stuff></p>

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple paragraphs with an ordered list’ is closed to new replies.