• Hiya,

    There are a couple of places in my blog where I want to add some extra space between paragraphs.

    Normally, I’d just add something like the following:

    <p>&nbsp;</p>

    However, when I save a page in WordPress, it seems to automatically remove this.

    Is there anyway to get it to stop doing that? Or is there another bit of code that I can use?

    Thanks alot for your help

Viewing 7 replies - 1 through 7 (of 7 total)
  • If your using the wysiwyg editor just hit return twice to insert a break or <br /> tag, if you’ve disable the wysiwyg editor and are just using the code then just use the <br /> tag itself.

    Thread Starter mortimerjazz

    (@mortimerjazz)

    Thanks Jeremy, but I’m afraid it doesn’t seem to be doing a whole lot.

    I can insert the
    tag (or hit return twice) and the extra space appears. However, as soon as I save the page, the tags are stripped out and the layout goes back to what it was previously.

    Thanks,

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Multiple empty lines like that will be removed and replaced with single empty lines. This is because WordPress conforms to using CSS for styling. Inserting extra HTML for spacing is sorta the wrong way to do it.

    Try something more like this instead:
    <br style="margin-bottom: 20px" />

    You can use other types of values instead of pixels if you like. If you want to insert 4 lines for example, then 4em might be more appropriate.

    Thread Starter mortimerjazz

    (@mortimerjazz)

    Thanks Otto – that’s done it ??

    Why don’t you just use <br /> ?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Multiple <br /> tags will be condensed down to one BR tag by WordPress.

    How can you make multiple spaces not to disappear?

    Like: “test test” ?

    I have a code and I would like my code to remain its whitespace.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘&/nbsp in WordPress’ is closed to new replies.