Jump to content

Hide an Advertisement Block on Mobile?


Ecnad

Recommended Posts

is there any way to hide an advertisement placement when a user is visiting on a mobile device? I have an ad block with two banners in it, so the "smaller version" option won't work, but the banners are too wide for mobile users and are breaking the mobile layout

Link to comment
Share on other sites

  • 1 year later...

Hello,

Each image advert has the wrapper with css class ipsAdvertisement

Also each image has own css class ipsAdvertisement_largeipsAdvertisement_mediumipsAdvertisement_small

You can hide small version adding into custom.css 

.ipsAdvertisement .ipsAdvertisement_small {
	display: none;
}

 

Link to comment
Share on other sites

3 minutes ago, Kjell Iver Johansen said:

Isn't that ipsAdvertisement_medium

Yes. It's all copy-paste :lol:

6 minutes ago, Thomas P said:

Stil confused: When I want to hide an Advertisement (ipsAdvertisement_large) only on mobiles and tablets - how would the a.m. CSS help?

The advert with class ipsAdvertisement_large displayed only on PC

Link to comment
Share on other sites

Let's me explain how advert images displays.

We have a block with 3 images:

- Large image displayed on PC

- Medium image displayed on Tablet. If you have not uploaded a medium image, a large image will be displayed.

- Small image displayed on Phone. If you have not uploaded a small image, a medium will be displayed. If you have not uploaded a medium image, a large image will be displayed.

So if you uploaded large image only you will see it on all devices.

If you need hide an image on tablet and phone add 

.ipsAdvertisement .ipsAdvertisement_small, .ipsAdvertisement .ipsAdvertisement_medium {
	display: none;
}

 

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...