• bartleby

    (@bartleby)


    Is there any way I can force WordPress to insert extra linebreaks in a post?
    Regardless if I add lines by hitting the enter key or adding
    tags, WordPress seems to be trimming it down to just one linebreak.

Viewing 6 replies - 1 through 6 (of 6 total)
  • TechGnome

    (@techgnome)

    It’s the nature of HTML more than WP…. but if you use   on those blank lines, it should work. It’s worked for me in the past.
    Tg

    It works with   but I think that quite a wierd way to do it, why does WP not accept < br / > (no spaces of course ;))???? ??

    I just discovered this bug about the line breaks. If WP is converted line breaks, it should convert ALL of them! And why <br/> isn’t working is a mystery to me.

    As TechGnome points out, this is the nature of HTML. The philosophy was that you tell the browser what it is, and the browser will make it look good (not nice!). Good as in well-readable. You should not want just an extra newline somewhere.

    Now that doesn’t help you much, does it? Ok. Say you want to make a paragraph and you want to give it a little more space on either side. That is a valid reason. Or you want to give all sections of a certain type (code, or quotes for example) an extra 1 line-height margin. What you would do then is hack your style.css instead, and put the margin there.

    This way your layour will look consistent throughout your blog.

    Using css it is possible to tweak it down to the finest level; a style rule would look like this:

    `
    .entrytext p {
    margin-top : 2em;
    }

    This will give all your paragraphs a little more space.

    When someone posts a message the sentences could be too long for the design, I have located the CSS that handles the looks of the posted message:

    .alt {
    margin: 0;
    padding: 10px;
    }

    This is in the style.css from a theme. This .alt tag…Could I use this to make the text fit within ‘the design’?

    I have put in a ‘width: 75%;’ but this doesn’t seem to work…

    How do other Blogs and all do this?! Presenting the ‘posted text from a visitor nice and within ‘the space’ it is suposed to do..?!

    I am really anoyed…And need help…Anyone?

    < br / > tags are automatically removed, and paragraphes are enclosed by < p > tags…

    entering < br / > tags does not work with version 2.0.4, but you can hack functions-formatting.php and comment out line 59, where it says:

    $pee = preg_replace('|<br />s*<br />|', "nn", $pee);

    don’t know if this causes any troubles, for me it is working right now, i have to use < br / > tags for extra linebreaks though, and it would be nicer if multiple \n’s would work es well…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘forced linebreaks’ is closed to new replies.