+ 1
Need help centering image in Web
Tried using align ="center" in the image tag but that doesn't work, If you can show me an example in both html and css id appreciate it. Code below https://code.sololearn.com/Wv041RuU9RT8/?ref=app
3 Respostas
+ 1
Hey, align is used for text usually, use the margin-left / margin-right in CSS.
Check the code I edited below.
https://code.sololearn.com/WPa91gp8hSlU/?ref=app
+ 1
Attribute align is not working for <img> tags. Wrap the <img> inside an <p align="center"> or use css: img{display:block; margin: 0 auto}
+ 1
Probably not the best way, but this works :D
<div align="center"><img></div>