• agytalks

    (@agytalks)


    Hello,
    I tried many ways but can’t get this work. The background image for id=featured-section is not showing up. It has the same path as other images in header section (‘/images/image_file.jpg’}, and they work fine. I have a custom template page file: front_page.php for my Home page and I want to include the featured section where my slider will go.

    So I got my front_page.php

    <?php
    /*
    Template Name: Front Page
    */
    ?>
    
    <?php get_header(); ?>
    <?php include(TEMPLATEPATH . '/featured_section.php'); ?>
    
    <?php get_footer(); ?>

    My featured_section php.

    <div id='featured-section'>
    
    </div>

    And my CSS

    #featured-section {
    	background: transparent url('/images/featured_bg.jpg') no-repeat scroll;
    	width: 619px;
    	height: 464px;

    My page : agytalks.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter agytalks

    (@agytalks)

    sorry, the CSS is:

    background: transparent url('/public_html/wp-content/themes/AgyTalks/images/featured_bg.jpg');

    Michael

    (@alchymyth)

    background: transparent url('images/featured_bg.jpg') no-repeat scroll;
    Thread Starter agytalks

    (@agytalks)

    Thank You, I have tried it but I put

    ('/images/featured_bg.jpg')

    cause I thought it needs a slash before….

    Thank you, it worked, don’t know how I didn’t noticed that 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘css image not showing’ is closed to new replies.