• Resolved mrmccarrin

    (@mrmccarrin)


    Hi,

    I am trying to add a black line under my h1 tag. Like how it is used on this website: https://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>

Viewing 11 replies - 1 through 11 (of 11 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Add your CSS through a Custom CSS Manager plugin.

    Thread Starter mrmccarrin

    (@mrmccarrin)

    Thank you.

    Thread Starter mrmccarrin

    (@mrmccarrin)

    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?

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

    Thread Starter mrmccarrin

    (@mrmccarrin)

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

    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 – https://jigsaw.w3.org/css-validator/

    Thread Starter mrmccarrin

    (@mrmccarrin)

    This is my site:

    https://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.

    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.

    Thread Starter mrmccarrin

    (@mrmccarrin)

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

    Try this:

    h1.entry-title{
    border-bottom: 1px solid black;
    }

    Thread Starter mrmccarrin

    (@mrmccarrin)

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘H1 Tags’ is closed to new replies.