• New lines are being ignored when the comments are displayed on my blog. The first new line is displayed, but any subsequent new lines are ignored. For example if you wanted to add 1 blank line between paragraphs (as you normally would), you would publish your comment looking like this:

    //begin example
    Hello

    Goodbye
    //end example

    However wordpress is displaying it like this:

    //begin example
    Hello
    Goodbye
    //end example

    When you view the comments through the admin panel, everything looks fine. I am having no problems with blog posts. I am only having problems with comments. Also, I can force a new line using the br html tag in the comments, but the users will not know this; nor should they have to. Why does wordpress remove new lines that have purposely been entered using the “enter” key?

    I have looked at similar posts regarding this problem with no help.

    Point me in the right direction please.

    wordblogger

Viewing 11 replies - 1 through 11 (of 11 total)
  • Why does wordpress remove new lines that have purposely been entered using the “enter” key?

    WordPress doesn’t but your current theme might.

    Thread Starter wordblogger

    (@wordblogger)

    Thanks for your reply.

    Unfortunately I can’t figure out where in my style.css things are getting screwed up. Would you have a suggestion as to how I can get “new lines” displayed in my comments? Below is the portion of my style.css that refers to the comments section:

    #commentblock h2 {
    font-size : 17px;
    color : #307396;
    padding : 20px 0 10px 0;
    margin : 0;
    font-weight : normal;
    }
    #commentblock {
    padding : 5px;
    margin : 40px 0 15px 0;
    }
    #commentblock p {
    font-size:11px;
    }
    ol#commentlist {
    padding : 0;
    margin : 10px 0 0 0;
    list-style-type : none;
    }
    .commentdate {
    font-size : 10px;
    padding-left : 0;
    }
    #commentlist li p {
    margin: 2px;
    padding : 0;
    }
    .commentname {
    color : #666;
    margin : 0;
    padding : 5px 5px 5px 0;
    }
    .commentinfo {
    clear : both;
    }
    .commenttext {
    clear : both;
    margin : 0 0 10px 0;
    padding : 2px;
    border:2px solid #f5f5f5;
    background:white;
    }
    .commenttext-admin {
    clear : both;
    margin : 0 0 10px 0;
    padding : 2px;
    border:2px solid #e8f7ff;
    background:#f5fcff;
    }
    .commenttext-admin p {
    margin-top: 1000px;
    }
    #commentsformheader {
    padding-left : 0;
    }
    #commentsform {
    text-align : center;
    margin : 0;
    padding : 0;
    }
    #commentsform form {
    text-align : left;
    margin : 0;
    }
    #commentsform p {
    margin: 0;
    }
    #commentsform form textarea {
    width : 99%;
    background : #fff;
    border : 1px solid #ddd;
    font-family: Tahoma, Verdana, sans-serif;
    }
    p.comments_link img {
    margin : 0;
    padding : 0;
    border-top-style : none;
    border-right-style : none;
    border-bottom-style : none;
    border-left-style : none;
    }

    Thanks to those who lend a hand.

    Thread Starter wordblogger

    (@wordblogger)

    Still no help or resolution on this issue.

    Anyone out there ??

    A link to your site would help.

    look for something like this:

    #commentlist li p{ margin: 0 0 0 0;}

    change to this line or similar.

    #commentlist li p{ margin: 0px 0px 10px 0px;}

    ogatha

    (@ogatha)

    I’ve got the exact same problem. I found the rule that chollaball was talking about but it didn’t help much, unfortunately. It looked like this for me:

    ol.commentlist li p { font-size:12px; margin:0 0 1em; }

    I changed it into this:

    ol.commentlist li p { font-size:12px; margin: 0px 0px 10px 0px;}

    And tried different values for the margin, but nothing happens. This is starting to become quite a problem for me as I’m gaining more and more comments on the blog. Any help with the issue would be greatly appreciated.

    ogatha

    (@ogatha)

    Anyone?

    ogatha

    (@ogatha)

    I can’t believe no one else has this problem.

    ogatha

    (@ogatha)

    I solved this on my own. It wasn’t the commentlist rule that I needed to change, it was the rule formatting the paragraphs in the comment section itself. It looked like this for me:

    div.bubble blockquote p { line-height:16px; margin:0px; padding:0px; }

    I changed it into:

    div.bubble blockquote p { line-height:16px; margin-top:10px; padding:0px; }

    The line-height attribute is set to 16px because that’s the line-height I use in my normal posts and I wanted it to look symmetric. In addition to those 16px, though, every new paragraph now gets an additional 10px in distance to the one preceding it. It’s an easy way around the autoformatting problem.

    Autoformatting?

    Turns out, this is possibly a bug in Google Chrome. Same comment renders fine in Firefox but does not skip lines in Chrome.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Line Breaks Ignored in WordPress Comments’ is closed to new replies.