Ask coding questions

← Back to all posts
question
SaraMESHREKI

How do I make my image be in the center on html?

Voters
SaraMESHREKI
Comments
hotnewtop
RYANTADIPARTHI

Solution

try doing text-align or margin-left

or

any should work

FloCal35

Defire center in a css file

and then use it in a <img>

Note: This will work for text and images

[deleted]

@FloCal35 .center is ok but you should do manual alignment in css to put where u want specifically