Creating a "mobile first" web app involves using the meta attribute "viewport" to help scale elements appropriately. However, there are instances where fixed sized elements are needed. For example, I want the following div to be 598px in height and 450px in width:
<div class="note">
<div class="note_text">Its my birthday, and I have treated myself to a very nice gift. </div>
<img class="sticker" src="/assets/sally/sally_04.png"/>
</div>
.note {
margin-left: 20px;
height: 598px;
width: 450px;
}
.sticker {
width:300px;
height:300px;
position: relative;
}
When viewed on an iPhone, the resolution of this element should fit within a single screen when scrolled to the top. However, it seems to render longer than expected. What could be causing this discrepancy?
Is there something obvious that I am missing in my code?