Advertisement Management

Ads not being scaled down to fit on mobile devices - Advertisement Management

Ads not being scaled down to fit on mobile devices

by Jasonpayne » Sun Jan 28, 2018 3:20 pm

When I pull my site on on mobile, the ad spills off the side of the screen. Not able to see the entire thing unless I scroll over. I would like to scale the images down based on the screen width of the devices... Images on the rest of my forum do this already.
Jasonpayne
Registered User
Posts: 4
Joined: Sun Jan 28, 2018 2:34 pm
Contact:

Re: Ads not being scaled down to fit on mobile devices

by Senky » Fri Feb 16, 2018 9:21 am

Jasonpayne,
images should be scaled based on screen width. It scales on my board. Can you post here live board URL with such image included?
Senky
Extension Customisations
Extension Customisations
Posts: 1720
Joined: Thu Apr 30, 2009 8:49 pm
Location: Slovakia
Name: Jakub
Contact:

Re: Ads not being scaled down to fit on mobile devices

by Jasonpayne » Mon Feb 19, 2018 9:02 pm

http://forums.wickedunderground.com
The banner at the top is the ad in question.
Jasonpayne
Registered User
Posts: 4
Joined: Sun Jan 28, 2018 2:34 pm
Contact:

Re: Ads not being scaled down to fit on mobile devices

by Senky » Tue Feb 20, 2018 7:27 am

Oh right, you have wrapped your image with a link. Since we are unable to cover all possible cases of ads to make them responsive, we only support responsive images if you upload them as banners via ACP and won't touch them. All other cases must be solved by the admin himself. Your solution is pretty easy, just change ad code to this:

Code: Select all

<a href="http://www.bankhardbeats.com"><img src="http://forums.wickedunderground.com/images/phpbb_ads/39dee1aec2d3e211bac0202581a1a235.png" style="display: inline-block; max-width: 100%;"></a>
Senky
Extension Customisations
Extension Customisations
Posts: 1720
Joined: Thu Apr 30, 2009 8:49 pm
Location: Slovakia
Name: Jakub
Contact:

Re: Ads not being scaled down to fit on mobile devices

by Jasonpayne » Fri Mar 09, 2018 3:07 am

I love easy fixes. Thanks for the help!
Jasonpayne
Registered User
Posts: 4
Joined: Sun Jan 28, 2018 2:34 pm
Contact:

Mobile size 468x60 banner

by wads24 » Wed Sep 12, 2018 3:31 am

How would I dynamically change width of a banner to fit for mobile devices?
Thanks in advance for a reply.
User avatar
wads24
Registered User
Posts: 419
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: Ads not being scaled down to fit on mobile devices

by wads24 » Thu Sep 13, 2018 1:09 am

Senky wrote:Oh right, you have wrapped your image with a link. Since we are unable to cover all possible cases of ads to make them responsive, we only support responsive images if you upload them as banners via ACP and won't touch them. All other cases must be solved by the admin himself. Your solution is pretty easy, just change ad code to this:

Code: Select all

<a href="http://www.bankhardbeats.com"><img src="http://forums.wickedunderground.com/images/phpbb_ads/39dee1aec2d3e211bac0202581a1a235.png" style="display: inline-block; max-width: 100%;"></a>
My turn "Senky"! I love this script, but just can't figure this out. My board is at: https://www.cbradiotalk.com/index.php
Thanks in advance for a reply.
User avatar
wads24
Registered User
Posts: 419
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: Ads not being scaled down to fit on mobile devices

by Senky » Thu Sep 13, 2018 9:34 am

What script do you mean?
Senky
Extension Customisations
Extension Customisations
Posts: 1720
Joined: Thu Apr 30, 2009 8:49 pm
Location: Slovakia
Name: Jakub
Contact:

Re: Mobile size 468x60 banner

by Senky » Thu Sep 13, 2018 9:37 am

Make your banner dynamic in width:

sample HTML:

Code: Select all

<img class="responsive-img" src="..." />
sample CSS:

Code: Select all

.responsive-img {
    width: auto;
    max-width: 1024px;
}
Senky
Extension Customisations
Extension Customisations
Posts: 1720
Joined: Thu Apr 30, 2009 8:49 pm
Location: Slovakia
Name: Jakub
Contact: