WordPress.org

Ready to get started?Download WordPress

Forums

Edit CSS on a single page (4 posts)

  1. lomap
    Member
    Posted 3 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 3 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. alchymyth
    Forum Moderator
    Posted 3 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
    Member
    Posted 2 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