Edit CSS on a single page (4 posts)

  1. lomap
    Posted 5 years ago #

    I'm trying to remove the left margin on just one page on my website, which uses the TwentyTen theme. I see where to edit it in the stylesheet, but that obviously changes the template for all pages... Thanks in advance :)

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Don't edit the Twenty Ten theme. Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

  3. Michael
    Forum Moderator
    Posted 5 years ago #

    use the output from body_class to target the individual page:

    .page-id-123 #your_selector { ... }

    123 is the page ID

    if you have trouble fixing this, post a link to your page

  4. skip2mylook
    Posted 4 years ago #

    If i have a premalink setup, with http:/sitename.com/post-name. How can i specify a css only for the contact page?

Topic Closed

This topic has been closed to new replies.

About this Topic