CSS - center two images in css side by side

后端 未结 5 1709
悲哀的现实
悲哀的现实 2020-11-27 16:40

I am trying to center two images side by side, but for some reason it always displays the images beneath each other. Does anyone know how I could get them centered and next

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 17:03

    Try changing

    #fblogo {
        display: block;
        margin-left: auto;
        margin-right: auto;
        height: 30px; 
    }
    

    to

    .fblogo {
        display: inline-block;
        margin-left: auto;
        margin-right: auto;
        height: 30px; 
    }
    
    #images{
        text-align:center;
    }
    

    HTML

    DEMO.

提交回复
热议问题