0
How to align image to the middle?
Image is not getting aligned in the middle. i tried by using <img src=" " align="middle" alt=" "/ >
4 ответов
+ 5
for learning purpose only.
Try this:
<p align="center"><img src="" alt="image"></p>
https://code.sololearn.com/W3Z0B8flzRLk/?ref=app
https://code.sololearn.com/W1h0C543y4Gn/?ref=app
+ 2
Thanks
+ 1
img{
display:block;
margin:auto;
}
+ 1
You can use this way to align it on the middle of any device's
img{
position: absolute;
top: 50%;
left: 50%;
transform:translate(-50%, -50%);
}