Vlad Balanescu
Vlad Balanescu

Reputation: 674

Resized text on computer but not on phone HTML

I want to resize my text according to the size on the screen. By using the new vw and vh seems to work fine on my PC, but when I am accessing the website from my phone the text remains the same. i.e: it's huge for my phone screen. Here is my code:

#aboutMe {
color: white;
font-style: italic;
font-weight: bold;
margin: 7vw 10px 5px 39vw;
font-size: 2.5vw;
}

Any guesses to how to solve this issue?

Upvotes: 0

Views: 49

Answers (2)

AsimRazaKhan
AsimRazaKhan

Reputation: 2202

you should avoid using px use em insted in the margin property. May it helps.

Upvotes: 1

Mosh
Mosh

Reputation: 471

Did you use something like <meta name="viewport" content="width=device-width, initial-scale=1">in your HTML?

Upvotes: 1

Related Questions