How do I get global text-indent and paragraph spacing for multiple paragraphs?

  • Unknown's avatar

    I want to know if there is a global HTML code(?) that I can put in at the beginning of a block of text that includes a text indent and a margin spacer so that when dialogue appears in a narrative it is indented. Right now I am using <p style=”text-indent: 30px; margin-bottom: 0;”> That works but I find that I have to do that for every line of dialogue in a particular section of the narrative. Believe me, that’s a pain. Is there such an HTML code that will affect en entire block of text? I’ve tried <dive style> but for some reason the theme I’m working with, TwentyTen, defaults all the div style changes I’ve made back to p style. The blog I’m seeking help on is https://odetosunset.wordpress.com If you look at the text editor, you’ll see what I did with the first section Day 1.01. I haven’t continued on this course because I’m hoping some one will come up with a global solution. I can’t publish the blog until I resolve this problem. Thanks

    The blog I need help with is: (visible only to logged in users)

  • Hi there. I tried the div-tag in Twenty-Ten and it works fine for me. I used it as follows:
    <div style="text-indent:30px;margin-bottom:0;">

    Make sure that you’re not perhaps nesting it inside another tag and also make sure that you have inserted the closing tag at the end of the section where you want it to apply.

  • Unknown's avatar

    Hi and thanks. I’ve tried that tag numerous times. It hasn’t worked for me. And when I go back to the text editor after checking its effect, the tag has reverted back to p style. I’ve tried saving the draft before exiting the text editor and even then when I go from visual to text, the tag is back to p style. Also even when I put the closing tag at the end of the section, it only affects one line of dialogue. Perhaps this is because the div tag is not taking. What I’m looking for is a tag that will apply to an entire section of text with multiple indents and margin settings.

  • Unknown's avatar

    Ok, I’ve solved the p style reversion problem. When I use the div tag and go back to the visual editor the font size on my text is smaller. I had solved that engaging paragraph in the visual tool bar which reverts the tags to p style in the text editor. If I don’t do that, then the div tags remain as they were. However, and this is the crux of my problem, even with the div tag it only affects the text indent on one line of dialogue. The margin value of 0 seems to be working for all. Can it be the syntax of the tag? Or should the tags be separate, one for text indent and one for the margin?

  • Unknown's avatar

    See here, under “Single line indents” and “First line indents”

    Formatting text pt. 2: indents and blockquotes

  • The div tag is the correct one to use in this case, as also confirmed by Timethief’s link. I used a single div tag when I tested it this morning to affect several paragraphs at once. Probably there is some other formatting involved that’s interfering with the div tag.

    Without seeing your actual code that’s pretty much as far as we can help you. If you want us to take a look at the code, paste it here between backticks (or use the code button above the reply box) so the software doesn’t render/strip out the code.

  • Unknown's avatar

    Yes, timethief, you’ve confirmed that because I want the traditional book look I will have to apply the tag to each individual paragraph and that there is no global fix for this problem. I had already been there (and now I must go back). Thanks, too, kokkieh, you got me thinking in the right direction, and I did solve at least one of my dilemmas with your help.

  • Unknown's avatar
  • The topic ‘How do I get global text-indent and paragraph spacing for multiple paragraphs?’ is closed to new replies.