• Register
  • Login
  • Pricing
  • Support
    • Support
    • Tutorials
    • Blog
    • Guide
    • Support Forum
  • Notification Settings Notification Settings
  • Private Messages Private Messages
  • All Messageboards
  • Help

Embed Width Not Working

Started 2024-09-25 by Elbert Chu

Elbert Chu

2024-09-25

Hi, this code isn't working in my Shopify page embed to fill the space. I'm still getting an inner scroll bar and only 2 image column width. I also tried maximizing the width this way as well, but still no go:

"<div style="overflow: hidden; width: 100vh; height: 100vh;"><iframe src="https://pollunit.com/polls/XXXX?embed=1&embed_options[disable_remote_overlay]=1&embed_options[kill_title]=1" style="width: 100% !important; height: 100% !important; border: none;" allowfullscreen="" frameborder="0"></iframe></div>

"

Markus Huber

2024-09-25

It’s difficult to diagnose the issue on your Shopify page without direct access.

In general, an <iframe> is considered a block element, which means it automatically takes up the full width of its parent element. In your case, it should be as wide as the <div> in your example. However, you’ve set the <div> width to 100vh (Viewport Height) instead of 100vw (Viewport Width).

The width and height attributes of the <iframe> control its own dimensions, but it will still be constrained by the parent’s height and width. If the content inside the <iframe> is taller than the <iframe>, the <iframe> will not automatically expand to fit it. I assume this is the scrollbar you see.

If you want the <iframe> to adjust its height based on its content, this cannot be done purely with CSS; JavaScript is required. We have an example of how to achieve this in our embedding tutorial.

Tools

  • Voting
  • Surveys
  • Free Tables
  • Collect Ideas and Feedback
  • Photo Contests
  • Video Contests
  • Music Contests
  • Landing Page
  • Pairwise Comparison
  • PollUnit Lab

Support

  • Get Started
  • PollUnit Help
  • Tutorials
  • Support Forum
  • support@pollunit.com

Tutorials

  • Create your first poll
  • Advanced poll features
  • Advanced survey branching logic
  • Distribute tasks online
  • Cast votes and rate options
  • Find a date
  • Vote on images
  • Create your own theme
  • Polls with your own logo
  • Evaluate your PollUnit
  • Dot Voting
  • Range Voting
  • Polls on your own website
  • Live Voting
  • Reach a consensus
  • Manage orga­nizations
  • Prevent multiple participation
  • Donations and participation fees

Legal

  • Privacy policy
  • Terms of use
  • Imprint

PollUnit

  • PollUnit Blog
  • About PollUnit
  • Press kit
  • © PollUnit
  • Register
  • Login
  • Pricing
  • Support
    • Support
    • Tutorials
    • Blog
    • Guide
    • Support Forum