Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS No idea why my background image media query is not loading

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #234996
    theplastickid
    Participant

    Hey everyone.

    Just launched a new site at http://www.startaa.com/

    I have a media query set up to display a different background image which looks like the following:

    // Displays background on mobile devices
    .home #header-wrap {
    background: url(images/front-page-background-mobile.jpg) no-repeat;
    background-size: cover;
    height: 100vh !important;
    }

    // Displays different background on desktops
    @media only screen and (min-width : 992px) {
    .home #header-wrap {
    background: url(images/front-page-background.jpg) no-repeat;
    background-size: cover;
    height: 100vh;
    }

    Everything works fine on my localhost but on my live server the background image doesn’t load on desktop. It loads on mobile fine.

    Anyone have any ideas?

    #234998
    gitsraj
    Participant

    can you check the image once more,because its not showing in your folder

    #234999
    Beverleyh
    Participant

    Strange. It’s in your themes folder but is throwing a 404 error http://www.startaa.com/wp-content/themes/startaa-child/images/

    The Dollarphotoclub pic does the same.

    Puzzling…

    #235012
    Senff
    Participant

    Works fine for me, but I see you changed the background image name to “front-page-background-fix.jpg”, so perhaps you’ve fixed it?

    #235013
    theplastickid
    Participant

    Hi all, thanks for the help. Yes I replaced the image file and it seems to be working, was very strange I have no idea what was causing the image to 404.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.