HTML img align=“middle” doesn't align an image

后端 未结 8 1235
臣服心动
臣服心动 2021-02-07 13:26

I want a image to be centered aligned. Image size is fixed in pixels.

So what I want is like this-

\"1\".

8条回答
  •  离开以前
    2021-02-07 13:59

    The attribute align=middle sets vertical alignment. To set horizontal alignment using HTML, you can wrap the element inside a center element and remove all the CSS you have now.

    If you would rather do it in CSS, there are several ways. A simple one is to set text-align on a container:

提交回复
热议问题