Editing CSS on Wordpress for a single page

211 Views Asked by At

So i am trying to apply CSS to a single page in wordpress and i am having a little trouble doing so, if anyone can direct me in the right direction that would be great.

I have this in the main theme css folder

.content h3 {
    background-position: left top;
    background-repeat: no-repeat;
    border-bottom: 1px solid #e8e8e8;
    color: #444;
    font-family: Arial,Helvetica,sans-serif !important;
    font-size: 21px !important;
    font-weight: bold;
    letter-spacing: 0;
    line-height: 100%;
    margin-bottom: 4px;
    padding-bottom: 14px;
    padding-left: 0;
    padding-top: 4px;
    text-transform: capitalize;
}

and i have put at the bottom of the CSS file this to effect a single page

.page-id-437 .h3.gv-field-3-1{
    background-position: left top;
    background-repeat: no-repeat;
    border-bottom: 1px solid #e8e8e8;
    color: #444;
    font-family: Arial,Helvetica,sans-serif !important;
    font-size: 21px !important;
    font-weight: bold;
    letter-spacing: 0;
    line-height: 100%;
    margin-bottom: 4px;
    padding-bottom: 14px;
    padding-left: 0;
    padding-top: 4px;
    text-transform: capitalize;
}

any help would be greatly appreciated thanks

EDIT: i should probably add that .h3.gv-field-3-1 is the specific field that i want to edit and 437 is the page id that i want it to go into

1

There are 1 best solutions below

13
On

There is nothing inherently wrong with your approach. Is h3 a class you have or should that be targeting an h3 with the class .gv-field-3-1. Also, are you sure your body has the page class?