• Resolved Beksters Lab

    (@beksters-lab)


    Hi, I was wondering if someone could help me please? I am trying to display an image on just the home page of a site. I’ve managed to get it to display by adding the following code to page.php:

    <div class="homeimage" alt="seascape">
    </div>

    and then in my stylesheet:

    .homeimage {
    	background-image: url(images/home.jpg);
    	background-color: #ffffff;
    	border: 10px solid #ffffff;
    	height: 400px;
    	width: 83%;
    	margin: 0em auto;
    	margin-bottom: 20px;
    }

    This works well but the picture displays on all pages except for Blog. I was wondering how I would go about making it just display on the front page of the site. Thanks,
    Bek.
    https://www.1978bektest.co.uk/howell2

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only display image in a div on one page’ is closed to new replies.