Display two images side by side on an HTML Page

后端 未结 7 1895
渐次进展
渐次进展 2021-01-06 07:09

I am trying to place two images of the same size side-by-side. If I use a table then I am able to display both images side-by-side. But in my CSS Stylesheet I a

7条回答
  •  难免孤独
    2021-01-06 07:55

    You can use float:left.

    html:

    css:

    .left{
        width: 250px;
        height: 250px;
        float: left;
    }
    
    //If you don't want margins
    body{
        margin:0;
        padding:0;
    }
    

    Fiddle

提交回复
热议问题