How do you vertically align images within a list or a div?

后端 未结 3 1308
星月不相逢
星月不相逢 2021-02-19 08:00

I have the following code for showing some images:

HTML:

3条回答
  •  逝去的感伤
    2021-02-19 08:42

    Add vertical-align: middle; to .footer-logos img:

    .footer-logos img {margin-left:20px;margin-right:20px;vertical-align:middle;}
    

    That said, you should set a fixed width and height in each of the elements to avoid the whole thing jumping up during page load.

提交回复
热议问题