Support » Themes and Templates » Can't find class to change border-top element

  • Resolved Little Laura

    (@little-laura)


    My website: creaturecomfortsofbalto.com

    I’ve successfully changed a couple elements, but can’t seem to find the class to change my border from 5 px to 15. What I tried because that’s what Firebug seemed to be showing me:

    .page page-id-78 page-template-default logged-in admin-bar customize-support {
        border-top: 15px solid #265E15;
    }

    Thanks…

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey. The border’s being applied on the body element as follows:

    body {
    border-top: 5px solid #265e15;
    }
    Thread Starter Little Laura

    (@little-laura)

    oh.. so, when I change the css style sheet on the child, do I put a period in front of the body? I have tried that, but to no avail. Just tried it again to be sure, like this:

    .body {
        border-top: 15px solid #265E15;
    }

    …but no success changing the border size. Looks great when I try it on for size in the Firebug viewer, but haven’t been able to actually accomplish the change.

    When you’re targeting a HTML element via CSS, you don’t need a period in front of that element’s name. The period tells the CSS to look for a HTML element with a class of that name, so the styles in your example would be applied to a HTML element such as <div class="body"> as opposed to the <body> element.

    should work in your custom CSS section:

    body { border-top-width: 15px; }

    btw:
    your CSS is wrong in your first example; what Firebug shows is the html with space characters between the multiple classes of one element; you need to ‘translate’ that to CSS with the spaces replaced by ‘.’ ;
    example:
    .page.page-id-78.page-template { ... }

    Thread Starter Little Laura

    (@little-laura)

    Many thanks; I have been able to make the change I wanted, and grow a bit in my very beginning little batch of understanding working with css.

    Glad you’ve made the change you wanted. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can't find class to change border-top element’ is closed to new replies.