WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Hard return doesn't put extra space between paragraphs (15 posts)

  1. jwesseldyke
    Member
    Posted 6 years ago #

    Generally in themes carriage return leaves a blank line between text, to separate paragraphs, for example...

    What in the css file dictates this? I'm using a theme, cute-seasons, and a hard return doesn't leave an extra blank line, just breaks that line and starts the new paragraph on the next... Makes the text cluttered and very difficult to read.

    Any ideas how to fix this?
    J

  2. moshu
    Member
    Posted 6 years ago #

    What in the css file dictates this?

    p
    (usually, it is the idiocy of the theme author: setting margins 0 - zero - all around the paragraphs)

  3. jwesseldyke
    Member
    Posted 6 years ago #

    that's what I'm searching for... I'm sure it's a margin issue, but I can't find the correct margin value... I know p is what breaks the lines, just don't see anything that says "p margin=0" or anything such...

    changing 'line-spacing' spreads out all the lines of text but not between paragraphs... That was one of my incorrect guesses... :)

    So it turns out the idiocy is inclusive of both the author and the guy editing the life out of the template... :)

    Thanks for your help...
    J

  4. moshu
    Member
    Posted 6 years ago #

    If there was a link to your blog in your profile (and not to a non-WP site) I could have told you exactly where the issue was.
    Lesson: If you have a display problem - don't ask questions without a link!

  5. jwesseldyke
    Member
    Posted 6 years ago #

    Good point...
    here's the link...

    sarah.asmallorange.com/~frmp

    Thanks again for your help, look at your convenience

  6. moshu
    Member
    Posted 6 years ago #

    Very bad CSS file...

    Add this to it:
    .post p {margin-top: 25px;}

    (play with that value to your liking)

  7. jwesseldyke
    Member
    Posted 6 years ago #

    Wow... Thanks... The CSS file does seem much different than others I've played with...

    I appreciate your help, and feel compelled to let you know that the site in question is not my site and that's why it's not listed in my profile... I'm just a volunteer helping out a church...

    Anyway, thanks again for the help...
    J

  8. moshu
    Member
    Posted 6 years ago #

    Keep it in one single thread: I deleted your other topic with the very same question.

    Finding_Your_CSS_Styles

  9. jwesseldyke
    Member
    Posted 6 years ago #

    Thanks, sorry if it was a double post -- to me it was different only because your solution worked in posts and not in pages...

    I'm still not sure why it does in one scenario and not in the other...

  10. moshu
    Member
    Posted 6 years ago #

    And what did you find when using the Codex tutorial I linked to above? Probably, in your Page Template (by default: page.php) you have another div, not "post".
    Also: Template_Hierarchy

  11. jwesseldyke
    Member
    Posted 6 years ago #

    I read the link, thanks you... Very informative...
    But, no, it uses the same div... right and post... Exactly the same as the posts... So I'm still playing detective...

    In fact, now I went back to look at the post pages to see if there was a difference that I missed beyond the obvious... And even the post pages are back to the same thing with no extra margin space between p's...

    Grr...

  12. moshu
    Member
    Posted 6 years ago #

    Hmmm... did you modify ANYTHING in the template files?
    I could swear yesterday it was <div class="post"> but now it is <div id="post">

    CSS 101:
    for class you use: .post
    for id you need: #post (in the stylesheet)

  13. jwesseldyke
    Member
    Posted 6 years ago #

    OK... I'm getting closer...

    The index.php file seems OK... It's the individual page and post pages that are causing problems... Back to the drawing board.

  14. jwesseldyke
    Member
    Posted 6 years ago #

    OK... So I had to print out the php files in question to find the difference... I STILL don't understand why it's coded like this or why the code makes it work... But that's irrelevant I guess... Here's the snippet that made it work correctly...

    <?php if (have_posts()) : ?>
    <?php $x = 0; ?>
    		<?php while (have_posts()) : the_post(); ?>
    <?php if($x = 0){ ?>
    
    				<?php $x++; ?>
    				<?php }else{ ?>

    Then the post information... Then...
    `<?php } ?>
    <?php endwhile; ?>`

    Maybe someone can splain it to me, maybe it's just not important, but that was the solution...

    Thanks again, Moshu for your help.
    J

  15. gerardjp
    Member
    Posted 6 years ago #

    Hi all,

    Had the same problem while reading this post ... and then it hit me. For everybody out there that just wants that onetime extra whitespace between your paragraphs. Here's how:

    http://www.gp-net.nl/2008/08/09/dirty-hack-for-wordpress-to-realize-a-hard-return/

    Kind regards,

    Gerard.

Topic Closed

This topic has been closed to new replies.

About this Topic