2nd May 2020, 3:06 PM
Piyush Duggal
Piyush Duggal - avatar
4 ответов
+ 5
text-align only work on block element. div is a block element. Try to make a parent div. align attribute is deprecated. img is inline-block element.
2nd May 2020, 3:23 PM
Calviղ
Calviղ - avatar
+ 1
cool thanks 😊
2nd May 2020, 3:25 PM
Piyush Duggal
Piyush Duggal - avatar
+ 1
Just use display: block; and margin: 0 auto; for an image.
2nd May 2020, 4:01 PM
Anton Kiilo
Anton Kiilo - avatar