Reputation: 738
I created an iPad that should challenge every responsive scenario (work in process).
It is working for orientation already, but currently, when I'm in landscape mode and the browser width is getting bigger and bigger, the .ipad
gets outside the screen.
The .ipad_wrapper
doesn't and want the .ipad
to behave the same.
Here is my code: https://jsfiddle.net/zw4shn2v/
.ipad_wrapper
width: 80vw
max-height: 90vh
outline: 1px solid red
.ipad
width: 100%
padding-top: 76.59%
height: 0
margin: 0 auto
position: relative
<div class="ipad_wrapper">
<div class="ipad">
<div class="ipad__front">
<div class="ipad__screen"></div>
</div>
</div>
</div>
Upvotes: 0
Views: 1763
Reputation: 133
body
min-height: 100vh
<div class="ipad_wrapper">
<div class="ipad">
<div class="ipad__front">
<div class="ipad__screen"></div>
</div>
</div>
</div>
Upvotes: 0
Reputation: 101
Looked at your JSFiddle and the issues are:
body
background: linear-gradient(315deg, #7B9195 100%, #B8D0D3 0%)
min-height: 100vh // remove this out OR change to max-height....
display: flex
justify-content: center
align-items: center
.ipad
width: 100%
padding-top: 76.59%
hight: 0 // change this to height
margin: 0 auto
position: relative
Let me know if this works out for you :)
Upvotes: 1