+ 13
How to keep a Button exactly at the center horizontaly inside a div?
12 odpowiedzi
+ 10
div {
display: flex;
}
button {
margin: auto;
}
https://code.sololearn.com/WOeM1xJ20vD2/?ref=app
+ 7
Calviղ Thanks 😊
+ 6
I use
button{
margin:auto;
display:block;
}
+ 3
I use
button{
margin:auto;
display:block;
}
+ 2
v align and h align tutorial
by Domino
https://www.sololearn.com/post/37760/?ref=app
About two months later, Domino herself recommended to use old ways because flexbox has compatibility issue.
+ 2
div{
display:flex;
justify-content:center;
align-items: center;
}
+ 1
calvin... why is the display flex pls?
+ 1
button{
margin:0 auto;
}
first value for vertical and next value for horizontal
u can use % or px or auto (this method your browser set it up)
0
Gordon Why @domino profile is an empty page? 😱
0
Calviղ 😭