Background image

  • John McCubbin

    #3543

    How do you add a background image in a post (for slider)

    John McCubbin

    #24804

    plus when i set it to thumbnail with a thumbnail pic it show no pic in slider

    Anonymous

    #24805
    .slider_post {
    background: url("image_URL");
    }

    John McCubbin

    #24806

    do you put this in custom css and were do you put the post id

    Mod

    Kenneth John Odle

    #24807

    Yes, you can put this in custom css.

    To make a css rule affect only a certain page, just prefix any css declaration with the post id:

    #post-1329 .slider_post {
    background: url("image_URL");
    }

    That basically tells your browser to apply that background to any object of class .slider_post only if it is part of an element with the id #post-1329.

    You would need to change to the correct post number, of course.

    John McCubbin

    #24808

    this didnt work the code i used was:

    #post-648 .slider_post {
    background: url("http://localhost:51792/wp-content/uploads/2012/02/Dumfries-Galloway-Citizens-Advice-Service-Logo.jpg");
    }

    Anonymous

    #24809

    Try background-image instead. (Use PNGs)

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!