+ 1
I am confused in display:flex;
How does it work? It's so confusing!! https://sololearn.com/compiler-playground/WGjbxcC9Lgcx/?ref=app
6 ответов
+ 3
display: flex
is applied to the PARENT.
You will need to use the other flexbox-attributes as well to understand what happens.
See the link in the code example for an overview.
https://sololearn.com/compiler-playground/WX9wE12KLHbx/?ref=app
+ 5
Manav Roy flex is a lot more powerful than just centering text, it’s how you get the entire website to look the way you want. It isn’t something you will learn in a day so keep on learning about it and you will see what you can do with it.
+ 4
You normally combine it with
align-items:
justify-content:
https://sololearn.com/compiler-playground/Wz5QIwZwN9zF/?ref=app
+ 1
RuntimeTerror btw I havevn’t heard from you in a while! Welcome back😁
0
RuntimeTerror
Then why using flex at first place when we can just do text-align:center; ?
p{
color: red;
border:4px solid blue;
position:relative;
top:300px;
font-style:italic;
font-weight:bold;
text-align:center;
}