Skip to content

Conversation

@dnoneill
Copy link
Contributor

closes #2945


def width
embed_request.maxwidth
embed_request.maxwidth || default_width
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The width attribute of an iframe element in HTML expects a valid positive integer representing the width in CSS pixels. It does not directly support percentage units.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it both with and without and it worked with 100%. When it wasn't set it went to 300px with width 100% it stretch the screen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suggests that it is valid: https://html.com/attributes/iframe-width/ but not recommended. We can have an another conversation about fixing this in Mirador and Spotlight but it would require use to touch two code bases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use "height" and "width" tags instead of "style" tags in the embed code

3 participants