• Resolved peterk900

    (@peterk900)


    I have created a custom full width page:

    <div id="primary">
    	<div id="content-fullwidthbg1" role="main">
    		<?php while ( have_posts() ) : the_post(); ?>
    '
    And added the following .css

    #content-fullwidthbg1 .entry-content {
    width: 100%;
    background-image: url(‘wp-content/uploads/2014/04/c2.jpg’);
    background-position: center center;
    background-repeat: no-repeat;
    }
    `
    But the page displays without any image. The css is certainly working because the page displays full width.

    I’ve checked that the image url is correct !

    Here is the url

    Any ideas please ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Background-url linking is wrong,
    use absolute path

    Like this:

    #content-bg1fullwidth .entry-content {
    width: 100%;
    background-image: url('https://www.marionandpeter.com/group200/wp-content/uploads/2014/04/c2.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    }

    Thread Starter peterk900

    (@peterk900)

    Thanks so much for solving this. Brilliant !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Background Image to Custom Page’ is closed to new replies.