Support » Fixing WordPress » WordPress Pages wont display <br />

  • I want to put some space in between a h1 and h2 element that is directly below it and since IE is not compatibel with h1+h2 that utilizes margin space, I just want to us br tags.

    When I do this:



    WordPress strips the br tags out of it. What are my options?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Are you putting this in the page template or in the actual page content?

    In the page content.

    IE and all browsers allow you to add space to your H1 and H2 and all the rest. Add the “space” in your CSS.

    h1 {margin:5px 10px 20px 5px; padding: 3px 4px 5px 6px;......}

    Don’t try to force it in with line breaks. It’s….messy.

    Wait, are you using the H1 and H2 heading in your page content? If you are using a WordPress Theme (not your own design), these two headings are reserved for special places, so any changes you make to them in the CSS will be found everywhere on every page.

    If you want to have headings in your post, try H3, H4, or even H5 within the content. Then you will have exacting control on these and they won’t impact your blog header and such.

    I created my own theme.

    I didnt want to have to resort to creating a new class or a h3-h5 since that is semanticly inccorect. It is the top level heading, which would be an h1. It is not a 3rd to 5th level heading which would no make sense to use it in that application.

    The h1 is displaying fine, and so is the h2 according to my stylesheet (no its not a default stylesheet).

    I feel it would be even messier adding another class for the h1 or h2 elements just to get a little extra room when an h2 is directly after a h1 element.

    I want a line break, which wordpress wont display.

    Regardless, the issue is that WordPress is stripping away
    tags which is should not if I put them in.

    Does WordPress do this for everyone, or is something else?

    Technically the following is “wrong”, though, this is a matter of perspective.

    <h1>Blah Blah</h1><br />
    <h2>Little Blah</h2><br/ >

    Spaces like that are controlled by the CSS. Why can’t you put a margin or padding in it?

    <div> & nbsp ; </div>

    Remove the spaces

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress Pages wont display <br />’ is closed to new replies.