WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help with HR tag (7 posts)

  1. wribbit
    Member
    Posted 7 years ago #

    Hi, sorry if I'm posting this in the wrong section.

    I'm trying to add horizontal lines to my post, as a way to separate different sections without using headings.
    I used the <hr/> tag.
    The line appeared on the "write" page, but when I update it, it's not there.
    Am I missing something?

  2. vkaryl
    Member
    Posted 7 years ago #

    When I do this sort of thing, I add the hr into the post area in index.php (in the theme, not the blog root) as opposed to trying to get the write stuff in wp to leave the html alone (which it doesn't do particularly well).

    You can style the hr with css too.

    [Then again, I may be misunderstanding you - is it that each post has several sections you want divided by hr lines? I was thinking you meant a separator between posts.... in which case, sorry.... And if the latter is the case, the way to maybe fix it is to disable the wysiwyg editor.]

  3. moshu
    Member
    Posted 7 years ago #

    In the default (and almost all of its clones) in the stylesheet there is something like this:
    hr {
    display: none;
    }

  4. Kafkaesqui

    Posted 7 years ago #

    "In the default"

    Crap. I'd almost consider that a bug.

  5. wribbit
    Member
    Posted 7 years ago #

    hi vkaryl,
    yeah, I did mean putting the HR within the Post.
    Thanks for the tips though.. Now I can go add a line in between the posts to make it neater ^^

    Moshu, thanks.
    I checked the css file, and indeed it was as you said.

    Just one more question.
    Is there any reason why the HR is not displayed by default?
    I mean, I don't want to remove that bit of code from the css file and mess other things.

  6. Kafkaesqui

    Posted 7 years ago #

    "I don't want to remove that bit of code from the css file and mess other things."

    You certainly don't. So instead of removing it, add this to your css:

    .post hr {
    display: block;
    }

    If your theme uses some other class for your posts' content section, replace .post with that.

  7. wribbit
    Member
    Posted 7 years ago #

    Thanks! it works beautifully ^^

Topic Closed

This topic has been closed to new replies.

About this Topic