Jump to content

Archived

This topic is now archived and is closed to further replies.

abuzzelli

Adjust background image for mobile

Recommended Posts

abuzzelli

Trying to adjust the position of the background image on http://churchofwolves.com/. I need the wolf background to move over to the left on mobile versions so it can be seen. Here's the code I'm using and it's not working. I've tried a bunch of different things. Getting frustrated. Any advice?

@media (max-width: 768px) {
.home .site-wrap{
background: url(http://churchofwolves.com/wp-content/uploads/2015/06/Church-of-Wolves-bkgd1.jpg);
  -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
 background-position: 100% 0%;
}
}

 

Share this post


Link to post
Share on other sites
Danny

HI,

The media query isn't overriding the default CSS. Therefore, can you show me the order of your CSS please.

https://cloudup.com/cdqs3XFjOSP


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
abuzzelli

Ah...I see. I moved the media query css to the bottom of my file and that did the trick. Thanks for the help!

One more question about this...why is my background image not showing up on other pages? I have the same template applied to all of them.

Share this post


Link to post
Share on other sites
Danny

The image will only be displayed on your homepage, as you have prefixed the code with .home


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
abuzzelli

I took off .home and the image went away completely. I also tried .site .site-wrap and that doesn't work either. What's the correct code?

Figured it out: body .site-wrap

Share this post


Link to post
Share on other sites

  • Similar Content

    • Bleuy
      By Bleuy+
      How can I get support on pagelines DMS? The product isn't that old and my skeleton themes aren't working and I can't get support in the same way? 
    • Bleuy
      By Bleuy+
      I have a number of legacy websites that are running on the above version of Pagelines DMS, where the template has stopped working. I am using a skeleton theme to all of them. What do I need to do to rectify this.
       
       
    • gstrahle
      By gstrahle+
      Hi,
      I am hoping to figure out how I can get my PageLines Full Nav to display layered in front of a sticky footer element on my website - 3keymedia.com
      I would like the Full Nav to overlay the entire screen when opening the menu as you will see when opening on a desktop the footer of nav content is cropped by the sticky footer.
       
      Thanks


    • Christian
      By Christian+
      Hi everyone, since Instagram had allowed to publish in different ratio formats (instead of only square ratio) the grams stripe has different heights. Can you tell me if i can fix it easily with some CSS?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
×