I am relatively new to the Hugo platform, but I have set up a personal website this week using the Academic theme and everything has been going smoothly. I recently added a shortcode that processes iframe embeds from Strava. On desktop browsers, the embed appears fine, but on mobile, the iframe is too wide. I have tried making the iframe responsive using custom CSS but I haven’t been successful thus far. Does anybody have any advice or tips that I could try implement to fix this?
The HTML shortcode used is:
{{ if and (.Get "id") (.Get "hash") }}
<div class="fixed-wrapper">
<iframe style="height: 405px; width: 100%; min-width: 360px; max-width: 590px;" frameborder="0" allowtransparency="true" scrolling="no" src="https://www.strava.com/activities/{{ .Get "id" }}/embed/{{ .Get "hash" }}"></iframe>
</div>
{{ end }}
Thanks!