Centre HTML widgets that are too big for the template

  • 2
  • Idea
  • Updated 7 years ago
  • Not Planned
On my site, I have an iFrame. In the iFrame, I have a forum. My forum is too big for the width of the widget, and I cant get it no become narrower. I dont want people to have to scroll sideways and I don't want to use a redirect script and send people away from my site. Could you make it so that, when a code is too wide, it centres it, instead of sending itout to the right hand side? If you look at this page you will see what I mean: http://www.therecipebook.org/forum.php
Photo of Will

Will

  • 224 Posts
  • 4 Reply Likes
  • eager to know what you can do as it would make my site look better, but I'm still feeling good about it all.

Posted 7 years ago

  • 2
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
Hi Will

It is possible that the style you are using is left-aligning the content.

You could try to shift the iFrame to the left using a negative margin number. The HTML code you can use is style="margin-left: -20px". You can adjust the margin by changing the number value. You will need to add the code inside the iFrame tag.

I hope this works for you!

Thank you
Nazlie
Photo of Will

Will

  • 224 Posts
  • 4 Reply Likes
Thanks. I have put this into all of my iframes to make it so that visitors can see more of the embedded page. If you want to see it on my site, visit: http://www.therecipebook.org/forum.php