How do I resize an external javascript in bootstrap (Newbie)

Hi all, I am new to coding. I am trying to add an external javascript banner by a hotel site to
my website, but I am unable to resize it using the usual method. What should I be doing instead or what am I doing wrong? I tried using a div ID but that didn’t work.

<div class="col-xs-8 col-offset-1 col-lg-12">
    <script type="text/javascript">
       agoda_ad_client = "xxxxxxxxxxxx";
       agoda_ad_width = 200;
       agoda_ad_height = 200;
    <script type="text/javascript" src="//"></script>

I don’t know this ad, but what “usual method” did you try?

Have you tried changing agoda_ad_width and agoda_ad_height?

1 Like

Hi @xtjnrchris! You can’t resize a script per se; I assume the script is dynamically loading some content into the page. You’d have to inspect that content with the dev tools of your browser and override its CSS where necessary (although this might be error-prone as you can’t know if/when that content changes; also they might be using an iframe).

Of course, as @Gandalf said, those properties are looking like good candidates too. I’d properly declare them as variables with var though (regardless of whether this is coming from the provider of the script or not).

I think it would depend on the type of banner you are inserting and whether it is re-sizeable or not. A lot of banners are not responsive and are fixed sizes so would be difficult (if not impossible) to scale properly.

Thanks for the replies, think I would have to in touch with the company instead.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.