Background image

  • John McCubbin


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

    John McCubbin


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


    .slider_post {
    background: url("image_URL");

    John McCubbin


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


    Kenneth John Odle


    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


    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");



    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.