Need help? Check out our Support site, then


Indenting some kinds of content, but not others?

  1. I'm using Pressrow theme with the CSS upgrade, and I'd like to have a first line intent to each paragraph on my "pages" ONLY -- that is, not on posts, and not in comments or headers. I added the following into my CSS code:

    p {
          text-indent: 2.0em;
        }

    ...but it seems to indent almost EVERYTHING. Does anyone know the code to limit the indent to the content in "pages" only? (Please let me know if I haven't articulated what I mean by pages as opposed to posts. Thanks much.

    likeeveryoneelse.wordpress.com

    PS - you can see an example of a page I'd like to indent at

    http://likeeveryoneelse.wordpress.com/read/part-one-our-better-instincts/

  2. It is doing what you are asking it to - it indents every paragraph. I am guessing that what you want is indents on all ..erm..substantial paragraphs, so that you don't get the indents on say quotes?

    You either must define another set of paragraphs, and write in the html-editor, or you can format inline: http://en.forums.wordpress.com/topic.php?id=32895&replies=2

  3. Thanks, Boblets. What I need to do is preserve the formatting from the Word document that's the origin of a series of "pages" I'm inserting into my blog. That formatting includes an indent after each carriage return, including quotes. What appears on the main page of the blog, the "Home" page, takes the form of brief posts that I will write through the WP text editor, and for that I do NOT want indented paragraphs. I also don't want indentation to appear in reader comments.

    I would be happy to write the indent into my pages through the p style / text-indent language in the HTML editor, but it appears that I would have to insert that language at the start and close of EACH paragraph. If so, I think I would prefer to just indent everything with the CSS code.

  4. Actually that code I had given is for hanging indentation, i.e. all lines of a paragraph indented but the first. For indenting the first line only, you must have a minus sign before the first number instead of the second.

  5. Let me think about this. In theory, it should be possible to make a div that states "indent all paragraphs within this div" - and that is what you are after, isn't it?
    Then you would have to write a tag first and last, but it would indent all paragraphs within. See?

  6. good person panaghiotisadam - I think he wants indents after each break, but don't want to write them. Are you with me on the div-idea?

  7. Boblets is right! You can write:
    <div style="margin-left:.-5in;text-indent:.5in;">
    and then all paragraphs get their first line indented.

  8. brilliant!

    (Remember to close it, though)

  9. Just found that if you switch to the visual editor after inserting the above code, it auto-closes and carries over to subsequent paragraphs as you type.

  10. oh, man! too much! too much knowledge all at once!
    Seriously though - this is very interesting. I have never really thought about it before. Very good to know, and thanks panaghiotisadam, for doing the testing (I am only here to arbitrarily throw out ideas with no basis in reality. We all have our roles to play..).

  11. Yeah, yeah, me doing all the dirty work... (no coincidence the other day the firm was boblets & pan and not the other way round!)

  12. lol

Topic Closed

This topic has been closed to new replies.

About this Topic