height controls not working
bencmbrook opened this issue · comments
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)
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
Gotcha. Appreciate the help.