• Resolved pope_acute

    (@pope_acute)


    website = https://qubrfc.byethost11.com/

    needing help with changing font colours. Should be an easy thing but i’m getting lost doing it.

    I know that the bootstrap in style.css for novalite changes the text for all teh site. Also that the text headings are group together h1,h2,h3 etc and i tried making just h2 #000 !important but it changes all h2 throughout the site.

    I tried css plugin but i couldn’t get the colours to change

    How do i target specific text h2 headings to a specific colour? For instance on the main page i want some h2 to be white and others to be black. And my contacts page the text matches background, need that changing too.

    any tips?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I think that you are going to struggle to achieve what you are after.

    I guess your heading elements are produced by PHP so you would find it difficult to add specific classes to the elements.

    If you were coding the elements individually, you would just add:

    <h2 class="black">Heading<h2>

    and then:

    h2.black {
         color: black;
    }

    Your code just generates straight heading elements. You could try :nth-child but then you would struggle with that if your choice of color is random or has no obvious pattern – I think.

    Thread Starter pope_acute

    (@pope_acute)

    martcol, thanks for info. I tried that code with !important before but changes on whole site not just that page or that class on the menu. I maybe have to just choose a colour for the whole site, go back to keeping it simple. ta

    Try reading a little on “CSS specificity”

    Thread Starter pope_acute

    (@pope_acute)

    ok so i watched a bunch of vids on specificity. points system etc.
    but how do i apply that to say the contact form of my site. I want all text on that page to be black. Do i edit the plugin class form? Is there a bit of code i can put in the style.css for the plugin to ignore inheritence settings from bootstrap.css of main theme?

    Look further up the code, there might be a class on the article or body that identifies that specific page or template. You could use that to target headings on just that page.

    For example, on this page:
    https://qubrfc.byethost11.com/contact_trashed/

    The body has this class:
    page-id-33

    You could do something like .page-id-33 .page_heading_content h1 to change the colour of the heading on just that page.

    Thread Starter pope_acute

    (@pope_acute)

    thanks ill give that a go

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘chnage text colour’ is closed to new replies.