Reputation: 99
I have a notebook and a monitor using 1920 X 1080 resolution but they have different screen size. (notebook : 13 inch, PC monitor : 19 inch)
I worked on the notebook screen, I defined the element 'Height' at 'Value X'px fixed (example value...). and then when I moved my internet browsers (chrome, IE, etc.) to PC screen, it showed me a lot of empty space as follows.
How can I solve this problem?
someone suggested me using media query... is it ok?
Upvotes: 0
Views: 62
Reputation: 4250
I have made an example below.. keeping the width and height in percentages that will adjust automatically on any device you will open.
*{box-sizing:border-box}
body,html{ width:100%; height:100%}
.bluebg{ width:100%; height:100%; background:blue; padding:20px;}
.yellowbg{ width:100%; height:100%; background:yellow; }
<div class="bluebg">
<div class="yellowbg">
</div>
</div>
Upvotes: 3