Moawya hks
Moawya hks

Reputation: 45

How to make elements of a webpage appear bigger in mobile browsers?

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

Answers (1)

Mayank
Mayank

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

Related Questions