WordPress.org

Ready to get started?Download WordPress

Forums

target posts with css (6 posts)

  1. Mark Shirley
    Member
    Posted 1 year ago #

    I use (body.page-id-492) to target specific pages in my css. is there a way to target posts generally (not a specific post.)

    ie

    body.post #primary {
    background-color: black;

    }

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You'd need to post a link to your site so someone can look at it - as it can vary in different themes...

  3. Mark Shirley
    Member
    Posted 1 year ago #

    ok my problem is if you click the first image (haircut with bob in it) it expands out but I have copy from the footer displaying on it. So I want to put a display none on the posts.

    http://www.spencerhaircompany.co.uk/bridal/

  4. Mark Shirley
    Member
    Posted 1 year ago #

    ie

    ie

    body.post #footer-info {
    display: none;
    }

  5. Mark Shirley
    Member
    Posted 1 year ago #

    ok found a kind of hack by styling over the top of it

    .image-attachment div.attachment {
        -moz-border-bottom-colors: none;
        -moz-border-left-colors: none;
        -moz-border-right-colors: none;
        -moz-border-top-colors: none;
        background: none repeat scroll 0 0 black;
        border-color: black;
        border-image: none;
        border-style: solid;
        border-width: 0px 0;
        margin: 0 -8.9% 1.625em;
        overflow: hidden;
        padding: 1.625em 1.625em 0;
        position: relative;
        text-align: center;
        top:0px;
        z-index: 100;
    }
  6. alchymyth
    Forum Moderator
    Posted 1 year ago #

    http://codex.wordpress.org/Function_Reference/body_class

    .single would be one of the body classes for a single post

Topic Closed

This topic has been closed to new replies.

About this Topic