Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

height controls not working #47

Closed
bencmbrook opened this issue Aug 8, 2017 · 2 comments
Closed

height controls not working #47

bencmbrook opened this issue Aug 8, 2017 · 2 comments

Comments

@bencmbrook
Copy link
Contributor

Is it only possible to set the width of devices?

Here's an example where I try to use height:
https://jsbin.com/qosejiyuji/edit?html,css,output
(for simplicity in the JSBin the device assets aren't there, but the CSS effect is the same)

@ben182
Copy link
Collaborator

ben182 commented Aug 12, 2017

Hi @bencmbrook,

basically you cannot control the height of the device through the css height property.
It is a bit more complicated since we need to respect the device's aspect ratio.
So the formula is: Wanted Height = X / Y * 100. X is the Wanted Height, Y is the padding-bottom property of the device DIV. This will calculate the needed width.
Here is the working example: https://jsbin.com/wacezudezi/1/edit?html,css,output

@bencmbrook
Copy link
Contributor Author

Gotcha. Appreciate the help.

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

No branches or pull requests

2 participants