+ 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
20 Respostas
+ 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 🤷♂️🤷♂️🤷♂️👍🏼
+ 2
Eli The Boy => use line height which is equal to height
https://code.sololearn.com/W7HJT4VZuVqZ/?ref=app
+ 1
The easiest way to do that is to change your 20% to 20vh. Viewport height works well in this situation.
+ 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
+ 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.
0
David lol wadaya mean?
0
Zach Hand and that will be the same as 20% in any browser and device?
0
It should work. Lemme check on a different device.
0
ok word thanks
0
No problem. Html is my main language so anytime you need more help just ask
0
thanks!!
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
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.
0
Virender Kumar Sood Thanks good to know but how does that help me with my current problem?
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..
0
шоо
0
hi
0
how are u
- 5
because the system is being stupid