My intention is to hide a SiteOrigin Image Widget on mobile (i.e. narrow) displays. I’m using a theme called ‘Sydney’ by aThemes.
I’m trying to achieve this vie SiteOrigin Image widget >> Widget Styles >> Attributes.
There I’ve entered:
– ‘narrow’ as the Widget Class (without the inverted commas) and
– the following CSS Styles
margin-top: 2em; @media (max-width: 400px) { .narrow { display: none; } }
However, the Image keeps showing up regardless of how narrow the screen is. What am I doing wrong?
Thank you!
Hi Thomas,
Do you have a public URL where we can take a look at what’s going on? If you need to keep this URL private from other users, just select “Private Reply” on the bottom right of the comment box.
This is a private message.
Hi Thomas,
Hm. Okay I see the issue. The issue is that you put the CSS into the styling field. That field applies the CSS specifically to where you put it – it acts as a container. In other words, it doesn’t accept selectors. I recommend installing SiteOrigin CSS Editor which will allow you to add CSS, like this, effortlessly.
Yes, it works. Thank you, very much!