+ 2

Why isn’t this working

I want the heading of my site to be about 20 percent of the screen, so they isn’t this like that? https://code.sololearn.com/W3iwa6Y8IfpH/?ref=app

17th Nov 2019, 12:46 AM
Eli
20 Réponses
+ 5
Eli The Boy You can use simply h1 tag for greatest heading and then you were style it with css , Zach Hand HTML is not a programming language 🤷‍♂️🤷‍♂️🤷‍♂️👍🏼
17th Nov 2019, 3:00 AM
🇮🇳Abhay Pratap Singh🇮🇳
🇮🇳Abhay Pratap Singh🇮🇳 - avatar
+ 2
Eli The Boy => use line height which is equal to height https://code.sololearn.com/W7HJT4VZuVqZ/?ref=app
17th Nov 2019, 5:15 AM
Virender Sood
Virender  Sood - avatar
+ 1
The easiest way to do that is to change your 20% to 20vh. Viewport height works well in this situation.
17th Nov 2019, 1:00 AM
Zach Hand
Zach Hand - avatar
+ 1
Abhay Pratap Singh but I wana make it so that its relative to my div meaning that from wherever its viewed or if the phone or computer is rotated it should always be about 90 percent of the div
17th Nov 2019, 3:07 AM
Eli
+ 1
Go to CSS stylesheet and type .div1{ font-size: 2rem; } Try putting different values instead 2 to make font size just as you wish.
18th Nov 2019, 4:20 PM
Vijay Mate
Vijay Mate - avatar
0
David lol wadaya mean?
17th Nov 2019, 12:58 AM
Eli
0
Zach Hand and that will be the same as 20% in any browser and device?
17th Nov 2019, 1:01 AM
Eli
0
It should work. Lemme check on a different device.
17th Nov 2019, 1:02 AM
Zach Hand
Zach Hand - avatar
0
ok word thanks
17th Nov 2019, 1:04 AM
Eli
0
No problem. Html is my main language so anytime you need more help just ask
17th Nov 2019, 1:15 AM
Zach Hand
Zach Hand - avatar
0
thanks!!
17th Nov 2019, 1:17 AM
Eli
0
Zach Hand now how would I make the text about 80% size relative to the div? percent doesnt do it and pixel wouldnt work cuz thats different in every device
17th Nov 2019, 1:58 AM
Eli
0
Would making the font-size: 17vw; work or are you going for a different look? You could pull the text down a tad with a little more code.
17th Nov 2019, 2:14 AM
Zach Hand
Zach Hand - avatar
0
Virender Kumar Sood Thanks good to know but how does that help me with my current problem?
17th Nov 2019, 5:21 AM
Eli
0
https://code.sololearn.com/W3dPcbwr9PBy/?ref=app And you want the heading to be vertically aligned center right? in this code your heading will be responsive and vertically centered, to whatever height you choose..
18th Nov 2019, 6:43 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
шоо
18th Nov 2019, 11:22 AM
Фарид Батталов
Фарид Батталов - avatar
0
hi
18th Nov 2019, 2:37 PM
Shakia Stevens
Shakia Stevens - avatar
0
how are u
18th Nov 2019, 4:26 PM
Shakia Stevens
Shakia Stevens - avatar
- 5
because the system is being stupid
17th Nov 2019, 12:48 AM
David
David - avatar