• Josh

    (@joshlooksaround)


    Heyho,
    I searched, but I didn’t find a working solution.

    I would like to have a different background image on the front-page, but the found answers didn’t work.
    My weebsite ( https://www.joshlooksaround.de ) is running on a custom theme and I have to admit, that I can’t code very much.

    Here is the part from the style.css:

    body
    {
        color: #1C1600;
        background: #D1CCC1;
        background-image: url('../../../Content/Statik/Grafik/bg.jpg');
        background-size: cover;
        background-attachment: fixed;
        z-index: 1;
        margin: 0;
    }
    body.front-page
    {
        color: #1C1600;
        background: #D1CCC1;
        background-image: url('../../../Content/Statik/Grafik/bg_front.jpg') !important;
        background-size: cover;
        background-attachment: fixed;
        z-index: 1;
        margin: 0;
    }
    

    body.home also didn’t work.

    How can I solve this problem?

    (Sry for my bad english;) )

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should be able to change the background by changing the image link in your first CSS block named body:

    background-image: url(‘../../../Content/Statik/Grafik/bg.jpg’);

    body
    {
        color: #1C1600;
        background: #D1CCC1;
        background-image: url('name-of-new-bground.jpg');
        background-size: cover;
        background-attachment: fixed;
        z-index: 1;
        margin: 0;
    }
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    you have the period in the wrong place and the order reversed

    body {background-image ...

    followed by

    .home body {background-image....

    But when I look at https://www.joshlooksaround.de/en/, I don’t see a <body> statement at all! That is not a wordpress-generated page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘different Background-img on the front-page’ is closed to new replies.