Why can't we align images using align attribute? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why can't we align images using align attribute?

<img src="file:///storage/emulated/0/Download/Untitled.png" align="center"> why isn't this possible (the source is random, focus on the alignment)

12th Aug 2017, 10:53 AM
Eyob G. Hagos
Eyob G. Hagos - avatar
4 Answers
+ 2
you need to set css text-align: center to parent
12th Aug 2017, 11:29 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 2
<div style="text-align: center"> your img </div>
12th Aug 2017, 12:01 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 1
Thanks @Yaroslav
12th Aug 2017, 12:02 PM
Eyob G. Hagos
Eyob G. Hagos - avatar
0
How? Write the code for me please!
12th Aug 2017, 11:59 AM
Eyob G. Hagos
Eyob G. Hagos - avatar