• Resolved ordresser

    (@ordresser)


    I’m using bbpress, and I want to change the color of the titles (just as an example) once people are INSIDE the thread. I don’t want the title colors to change on the list of threads, or on my blog posts or anywhere else.

    I’d like to add custom styles to my style.css for this.

    Any way to do this? Thanks

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

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    There should be HTML classes available for you to target particular pages and then particular sections of the page. Is this not the case?

    Thread Starter ordresser

    (@ordresser)

    I’m not sure. I’ve done a fair bit of WordPress dev, so I think I’d understand if you or someone could explain those two concepts:

    1) how do I find the “HTML class” for the page I want to target? What would it look like?

    2) once I have that, how can I put that in my style.css to cause styles for just that .php?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which browser are you using?

    Thread Starter ordresser

    (@ordresser)

    Chrome, but I test on Explorer as well

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Chrome has a developer toolbar that can be accessed by pressing F12, or right clicking on the page and selecting ‘Inspect element’.

    On your webpage and right click on the thing you want to style. Then select ‘Inspect element’. A toolbar will appear and you should be able to see the HTML of the element.

    https://developer.chrome.com/devtools

    Thread Starter ordresser

    (@ordresser)

    Oh, you’re just talking about “inspecting” the page. Yeah, I work with that daily.

    And I can locate the elements on the page, but they are not differentiated from elements (ie title) on other pages. So I’m looking for a way to say to style.css something like:

    if is whatever.php {do these styles}

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    So when you inspect the page, the body element should contain something unique to that page or template. What classes does the body element have?

    Thread Starter ordresser

    (@ordresser)

    Oooh. Aaah. I have learned something today.

    Thanks. This question is resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to apply css (using style.css) to only a particular type of page’ is closed to new replies.