WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] H1 Tags (12 posts)

  1. mrmccarrin
    Member
    Posted 1 year ago #

    Hi,

    I am trying to add a black line under my h1 tag. Like how it is used on this website: http://www.pearsonkoutcherlaw.com

    I got this code from W3C Schools and have played around a lot with it, but I don't understand where to put all the components? Can someone please help?
    <html>
    <head>
    <style>
    p
    {
    border-top-style:none;
    border-right-style:none;
    border-bottom-style:solid;
    border-left-style:none;
    }
    </style>
    </head>

    <body>
    <p>2 different border styles.</p>
    </body>
    </html>

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Add your CSS through a Custom CSS Manager plugin.

  3. mrmccarrin
    Member
    Posted 1 year ago #

    Thank you.

  4. mrmccarrin
    Member
    Posted 1 year ago #

    Hi Andrew,
    Thank you for your help. However, now I am writing:
    <head>
    <style>
    h1
    {
    border-top-style:none;
    border-right-style:none;
    border-bottom-style:solid;
    border-left-style:none;
    }
    </style>
    </head>

    in the editor and I have:

    <h1>Content </h1> in the html of my page editor and its not working? Can you please explain to me what I am doing wrong?

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You should not have the head and style tags in the editor if it's for external CSS.

  6. mrmccarrin
    Member
    Posted 1 year ago #

    Thank you. I took those out and it is still not working? Any other suggestions?

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Post a link to the site so someone can look at it - or use a tool such as Firebug to see what other styles may be interfering. CSS is totally theme and site specific so copying styles from someplace else may not work.

    Also make sure your code is valid - http://jigsaw.w3.org/css-validator/

  8. mrmccarrin
    Member
    Posted 1 year ago #

    This is my site:

    http://meganrmccarrin.com/

    can someone please also help me with the comma after the work Home, I put it there by accident and cannot find it.

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You have <style> tags in the style.css file - AND you absolutely should not be modifying theme files in a default theme - all of your changes will be lost when WP is updated. You need to create a Child Theme or if you are only going to make CSS changes you can use a CSS plugin as suggested above.

  10. mrmccarrin
    Member
    Posted 1 year ago #

    Thank you. I have fixed these things and checked the code, however, it is still not working with the CSS Plugin. ANy other suggestions?

  11. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Try this:

    h1.entry-title{
    border-bottom: 1px solid black;
    }
  12. mrmccarrin
    Member
    Posted 1 year ago #

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.