How to align a text and an image in CSS

An inline element (display value of inline-block) is a <img> element. Adding the text-align: center; CSS property to the parent element containing it makes it simple to center. An element at the block level, like a div, must have the <img> in order to center an image using text-align: center. You can accomplish a horizontally … Read more

Categories CSS