Skip to content

Use container div to correctly size preview iframe#991

Merged
outoftime merged 1 commit intopopcodeorg:masterfrom
outoftime:frame-container
Aug 17, 2017
Merged

Use container div to correctly size preview iframe#991
outoftime merged 1 commit intopopcodeorg:masterfrom
outoftime:frame-container

Conversation

@outoftime
Copy link
Copy Markdown
Contributor

Fun fact: you can’t use top/left/right/bottom to size an absolutely-positioned iframe!. You need to give iframes explicit height and width, full stop.

The solution is pretty simple—add a container <div> that we size using the absolute position boundaries, then give the iframe a height and width of 100%.

Fixes #989
Fixes #990

Fun fact: [you can’t use `top`/`left`/`right`/`bottom` to size an
absolutely-positioned
iframe!](https://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height).
You need to give iframes explicit `height` and `width`, full stop.

The solution is pretty simple—add a container `<div>` that we size using
the absolute position boundaries, then give the iframe a `height` and
`width` of 100%.
@outoftime
Copy link
Copy Markdown
Contributor Author

@pwjablonski FYI

@outoftime outoftime merged commit 4ecf983 into popcodeorg:master Aug 17, 2017
@outoftime outoftime deleted the frame-container branch August 17, 2017 23:01
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.

1 participant