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>
6 odpowiedzi
+ 4
You can use <center></center> tag.
+ 4
💜 Alex Tusinean 🍇 The <center> element and align attribute were deprecated, because they defines the presentation of its contents.
Use css instead.
+ 3
top: 50%;
left: 50%;
transform: translete(-50%,-50%);
0
Yeah. You could use
margin: auto
like this:
https://code.sololearn.com/W1l79w85w1DD/?ref=app
0
Tonik Horkel ಠoಠ. translate*
- 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!