Jump to content

Hide an Advertisement Block on Mobile?


Ecnad

Recommended Posts

Posted

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

  • 1 year later...
Posted

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;
}

 

Posted
49 minutes ago, Thomas P said:

sounds good, but wouldn't that hide the advert from all devices?

ipsAdvertisement_large uses for PC

ipsAdvertisement_medium uses for Tablet

ipsAdvertisement_small uses for Phone

Posted
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

Posted

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;
}

 

Archived

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

  • Recently Browsing   0 members

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