WordPress.org

Ready to get started?Download WordPress

Forums

post P and BR commands (7 posts)

  1. thornomad
    Member
    Posted 8 years ago #

    Hello,

    I'm going to be posting a memoire/audiobook on my wordpress site (once I get it running). I wanted some advice on how to make the formatting change from MS Word to WordPress as easy as possible.

    When I copy an entire chapter into the text dialogue box I notice that my paragraphs are seperated by <br /> commands (because the copy/paste doesn't add a full hard return between paragraphs) and the sections of my chapter are marked with <p> because they are spaced accordingly.

    This isn't a problem, if I can figure out how to make new paragraphs marked with the <br /> tag indent on the first line (just like a regular document). Is there a CSS line I can add for that in my class for the body of the post?

    The other item I noticed is the WordPress is adding <p> markers inside of the <blockquote> markers, which is overriding my blockquote formatting.

    Thanks everyone.

  2. Sam_a
    Member
    Posted 8 years ago #

    It sounds like you're copying your memoir text from Word and pasting it (plain text) into the WordPress Enry field?

    I think you'll find it easiest if you actually transform your written "paragraphs" (separated by one line break) into true HTML paragraphs (<p>...</p>) for publishing on WordPress.

    If you're using Markdown for text formatting, you would just need to replace each single line break in your source text with two line breaks.

    To indent the first line of each paragraph, you'd use something like

    .post p{
    text-indent: 2em;
    }

    This is why you want to use real HTML paragraphs, of course :)

    The other item I noticed is the WordPress is adding [p] markers inside of the [blockquote] markers, which is overriding my blockquote formatting.

    Adding paragraphs inside blockquotes is actually the right thing to do. What kind of styles do you want for the blockquotes? It should be pretty easy to adapt even with paragraphs inside.

  3. thornomad
    Member
    Posted 8 years ago #

    Hi,

    All right, if using the <p> for each paragraph is more correct I will suck it up and add all the little <p>'s myself. Smile.

    I was trying to adjust my stylsheet to account for the line-height and font-family of the blockquote; however, while I could change the color and the fontsize, my line-height arguments wouldn't be accepted. When I pulled up the website in Firefox and looked at how wordpress was putting everything together, I saw <blockquote><p> and I assumed that the <p> command was overriding my <blockquote> wishes.

    If I move the <blockquote> tag to inside the previous paragraph -- so there are no hard returns -- then wordpress doesn't add the <p> inside the <blockquote> tag and my formatting works.

    Here is my style sheet entry:

    .storycontent-cat2 blockquote { border: none; color: black; line-height: 100%; font-family: monospace;}

    I don't have the site up live yet, so I can't show you the whole thing. I am not particularly wise in these areas, but I thought maybe some of the p formatting in the stylesheet was overriding my blockquote formatting.

    Thanks,
    Damon

  4. thornomad
    Member
    Posted 8 years ago #

    I added this to my stylesheet:

    .storycontent-cat2 p { text-indent: 2em; }

    The indent also effects the blockquote; is there a way to signify that a <p> inside a <blockquote> should behave differently than one acting on its own ?

    thanks,
    Damon

  5. thornomad
    Member
    Posted 8 years ago #

    I think I solved it; what I did was limited the universal blockquote setting to apply only to pages and the other categories of my blog that don't contain the memoire by typing:

    .pagetext blockquote, .storycontent blockquote { border-left: 2px dotted #2F700F; margin-left: 1.5em; padding-left: 5px;}

    Then it seems to leave my other blockquote alone and I no longer have the cascading conundrum.

    Thanks.

    D

  6. Sam_a
    Member
    Posted 8 years ago #

    If I move the [blockquote] tag to inside the previous paragraph -- so there are no hard returns -- then wordpress doesn't add the [p] inside the [blockquote] tag and my formatting works.

    Hi Damon. I would still recommend keeping paragraphs inside the blockquotes; and definitely don't put blockquotes inside a paragraph -- that's invalid HTML and it could make the styling unpredictable anyway.

    You can fix the styling conflicts by applying text-indent and line-height rules directly to the quoted paragraphs:

    /* memoir paragraphs */
    .storycontent-cat2 p {
    text-indent: 2em; /* indent first line */
    }
    /* memoir blockquote paragraphs */
    .storycontent-cat2 blockquote p{
    text-indent: 0; /* no indent */
    line-height: 1; /* tighter spacing */
    }

  7. thornomad
    Member
    Posted 8 years ago #

    Thank you thank you! Using the

    .storycontent-cat2 blockquote p gets me into it; I didn't know how the CSS could be so specific in addressing nested content like that.

    thanks. learned something new.

    D

Topic Closed

This topic has been closed to new replies.

About this Topic