Комментарии:
Great 👍
ОтветитьCheers from 2023! Excellent tutorials.
ОтветитьHTML :
<!DOCTYPE html>
<head>
<title>CENTER THE TEXT</title>
</head>
<link rel="stylesheet" href="style.css">
<body>
<h1 class="text">HTML & CSS</h1>
</body>
</html>
CSS:
body{
background: yellow;
margin: 0;
padding: 0;
}
.text{
font-size: 4em;
color: cornflowerblue;
margin: 0;
padding: 0;
align-items: center;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
😃❤
Thanks for the Video that helps me alot
Ответитьgood job bro
Ответить🙏🥰
ОтветитьThanks! This helped me a lot , I enjoyed the music too. Lol!
Ответитьhey how do i change the text color?
Ответитьthanks you, it works really well for my website project
ОтветитьOr you can simply just put it into the <div></div > and give margin left !!!
ОтветитьYeah bro many many thanks. Can't found the appropriate keyword for me you solved it.
ОтветитьThank you!
Ответитьthanks
ОтветитьThanksssssss a lot!
Ответитьyour music is terrible...
ОтветитьU ARE THE BESTTT
Ответитьthank you!
Ответитьit doesn’t work for me
Ответитьthanks bro
ОтветитьCan we not use bottom and right 50% as well??
ОтветитьThank you.thank you thank you so much ....has been struggling for this whole one day..❤️❤️❤️
ОтветитьI need explanation. Otherwise good
Ответитьor u could just add <center> and </center> on both edges before the code so u can put on the center :D
ОтветитьCool soundtrack bro 😎
Ответитьposition: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%)translateY(-50%);
Me
h1 {
color:white;
text-align:center;
}
Thank you.
ОтветитьLove Content #12
ОтветитьThank you very very much!
Just what I was looking for! :)
Thank You very very very much.
Ответитьthanks so much!! Helped me a lot!!
Ответитьthanks man. its working
Ответитьwhy wont it let me increase the size of the text
Ответитьfor me it works in css. thank you!
ОтветитьI was enjoying both the tutorial and the music 🙏🤗
Ответитьtaena kasi bakit kaya ako nag aaral
Ответитьwhat is this music I am not a 5 year old.
ОтветитьThank you so much! Nearly spent a day trying to get it to the center.
ОтветитьWhich app is that ?
Ответитьdidn't work for me /: the text goes to the right
Ответитьit doesn't work
ОтветитьYour video is helpful for me. Thanks
ОтветитьHello there. What text editor is this?
ОтветитьVery helpful, tx
ОтветитьThanks bro, helped me a lot
Ответитьthanks bro you are the best!
ОтветитьСпасибо чувак!!!!
Ответитьشكراً 👍
كنت ابحث عنه
I just started to watch your all videos I will add the code here
<!DOCTYPE html>
<html>
<head>
<title>Text Center</title>
<meta charset="utf-8">
<style type="text/css">
body{
margin: 0px;
padding: 0px;
background-color: red;
}
h1{
font-size: 5em;
margin: 0px;
padding: 0px;
background-color: yellow;
font-family: 'arial';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
</style>
</head>
<body>
<h1>TEST</h1>
</body>
</html>
thanks, it worked for me.
Ответить