Комментарии:
Hindi me bol Bhai,katai angrez hora
ОтветитьText align centre simple
ОтветитьBangalir favourite ebong ekmatro jana profession - teacher.
ОтветитьFor this particular use case, "text-align:center" Is better
Ответитьthus textalign:center doesnt work?
Ответитьposition:relative;
Left :__px;
Top:__px;
text-align: center
ОтветитьAll set flex or grid thays it
ОтветитьIf i get asked this in an interview I will ask for more money
ОтветитьMargin: auto works too
If you like to love dangerously
If it's an interview question. I wanna get placed in meta
ОтветитьKeep it
ОтветитьHow would you do if want to make that when you press on your navbar(iphone screen) it always gets on top even if you have image
ОтветитьThanks 👍
ОтветитьFor short text like this I like doing line-height = height of the element
Ответитьdisplay:grid; place-items:center; height:100%;
Ответитьposition: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
We can do it in 6 ways.
ОтветитьThere are lots of ways to center div. Grid, flex, positioning, margin: auto.
ОтветитьI guess no need of setting height once using FLEX's justify-content & align-items together.
ОтветитьYou can center a div using flexbox, grid, transform, position and much more
ОтветитьWhat ide you use?
Ответитьif you show the window by resizing it then the effect will be clearly visualized.
ОтветитьGoood
ОтветитьWidth: 500px
Margin :auto
display: grid; place-items: center;
Ответить