Center image using text-align center
Problems:
- html img class - The problem is, is there any good way to center an html image tag using css ?
- Is the property text-align: center;of img html5 will work?
Solution 1:
- That will not work as the text-align property applies to block containers, not inline elements, and html img is an inline element.
Use this instead in your img html :
Solutions 2:
try the following solution for img tag
Solution 3:
- Another way of doing would be centering an enclosing paragraph.
- text-align: center is a good way to center an html image tag, and did not specify that the property had to be a part of the img tag.
Solution 4:
You can do the following solution: text-align: for your html5 img tag
Solution 5:
Here the solution is simply for your img tag html. change parent align.
Try this one on parent properties text-align:center