XF 2.1 Advertising Banner: How to use a smaller version for mobile?

I'm displaying an advertising banner on my forum. I used the Setup > Advertising function and added img code to display the banner in the Container Breadcrumb: Above position.

On mobile, the banner is very small and hard to read.

Is there a way to display an alternate advertising banner for the mobile version?

TIA!!!
 
Perhaps this will help,
 
Perhaps this will help,

Thanks! I see some tasty stuff in there, but alas, I am not a programmer, so most of it is over my head. I'm using simple HTML code to display an image.
 
Try this, it is off the top of my head so no guarantees but something like this will work. adjust screen size px to what you want

In your ad code html

Code:
<img class="large" src="path_to_large_banner" />
<img class="small" src="path_to_small_banner" />

In your style template extra.less

Code:
@media only screen and (max-width: 720px)
{img.large
{display:none}
}

@media only screen and (min-width: 721px)
{img.small
{display:none}
}
 
Last edited:
Try this, it is off the top of my head so no guarantees but something like this will work. adjust screen size px to what you want

In your ad code html

Code:
<img class="large" src="path_to_large_banner" />
<img class="small" src="path_to_small_banner" />

In your style template extra.less

Code:
@media only screen and (max-width: 720px)
{img.large
{display:none}
}

@media only screen and (min-width: 721px)
{img.small
{display:none}
}

That totally worked! Thanks!
 
Back
Top Bottom