This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Hiding background on mobile devices

  • Creator
    Topic
  • #14628
    jtobler
    Participant

    Hi Jason, Thanks for an awesome template!

    I’ve looked over your previous answers and am attempting to hide the background on mobile with the following code:

    @media (max-width: 480px) {
    body.custom-background {
    background-color: rgb(29, 29, 29);
    background-image: none;
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    }
    )

    This works only in Firefox using developer tools. But when I add this in the CUSTOM CSS in Alyeska Theme Options, it doesn’t work. The culprit seems to be that this custom code is loaded earlier than your inline code, as show here:

    http://postimg.org/image/rhjwswys9/

    You can see that the code I added (inline:42) is overwritten by your code (inline:61).

    How do I accomplish this?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #14646
    Jason Bobich
    Keymaster

    Hello,

    This is actually the code outputted from WordPress background control feature. There’s probably several different ways to tackle this, but the quick and dirty way would probably be to just use !important on your CSS you’re putting into your Custom CSS option.

    @media (max-width: 767px) {
    	body.custom-background {
    		background-color: rgb(29, 29, 29) !important;
    		background-image: none !important;
    		background-repeat: no-repeat !important;
    		background-position: center top !important;
    		background-attachment: fixed !important;
    	}
    }
Viewing 1 replies (of 1 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.