0

How to install image on center

I wonder how to install image to center in Html Align=center isn't working in tag <img>

21st Aug 2019, 7:35 AM
Mardonbek
6 Respostas
+ 4
You can use <center></center> tag.
21st Aug 2019, 7:41 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 4
💜 Alex Tusinean 🍇 The <center> element and align attribute were deprecated, because they defines the presentation of its contents. Use css instead.
21st Aug 2019, 7:47 AM
Calviղ
Calviղ - avatar
+ 3
top: 50%; left: 50%; transform: translete(-50%,-50%);
21st Aug 2019, 8:00 AM
Tonik Horkel ಠ_ಠ
Tonik Horkel ಠ_ಠ - avatar
0
Yeah. You could use margin: auto like this: https://code.sololearn.com/W1l79w85w1DD/?ref=app
21st Aug 2019, 7:52 AM
Airree
Airree - avatar
0
Tonik Horkel ಠoಠ. translate*
21st Aug 2019, 9:00 AM
HNNX 🐿
HNNX 🐿 - avatar
- 1
img{ position: absolute; top: 50%; (or else depending on the size of your display) left: 50%; (or else, again depends on your display ) } Works flawlessly!
21st Aug 2019, 9:24 AM
Vasilis Karapas
Vasilis Karapas - avatar