Reputation: 45
I'm trying to build a responsive design for my webpage, but when I resize it, the elements are getting smaller.
Is there any way to make elements appear with a reasonable size in mobile browsers?
Here is the code:
body {
background-color: #EAEAEF;
}
.cover {
width: 840px;
height: 300px;
position: relative;
right: 2%;
background-color: blue;
}
<body>
<div class="container">
<div class="cover">
</div>
</div>
</body>
Upvotes: 1
Views: 643
Reputation: 46
Try setting viewport
for your webpage.
<meta name="viewport" content="width=device-width, initial-scale=1" />
Add above on top of your webpage.
Upvotes: 1