Home Forums Archived Forums Mobile View Two different backgrounds on homepage (mobile and desktop) Re: Two different backgrounds on homepage (mobile and desktop)

#32745
scrambler
Moderator

To explain the logic:

when you add a rule in the per page style box, it automatically adds the page id class
#wrapper {….}  becomes  .page-id-xxx #wrapper {…}

The page-id-xxx class is on the body tag.
The device classs like .is-mobile is also on the body tag, and therefore if both are in the same rule they should be connected with no space.

If you put  .is-mobile #wrapper {…}  in the per page style box it becomes   .page-id-xxx .is-mobile #wrapper {….}  which is wrong as there is a space between the page id class and the is-mobile class.
the correct rule would be .page-id-xxx.is-mobile #wrapper {…}

By adding the +, you tell the theme to NOT add the page-id class and leave the rule intact.
that allows you to put the full rule with the proper syntax after the + and not have the theme add its own page class.

Hope that clarifies