Why “Inline-block” doesn't work properly in this CSS?

后端 未结 5 2093

Please check the CSS below.

 /*rex is the container of ex,ex2,ex3*/
div.rex{
height:200px;
border:0px;
margin:60px auto;
padding: 0;
vertical-align:top;
}

div.e         


        
5条回答
  •  面向向阳花
    2021-02-01 05:39

    Add float:left; to your div.ex, div.ex2 and div.ex3 instead.

    JSFIDDLE

    UPDATE: Add position:absolute to second and third div if float is not a choice.

    FIDDLE

    UPDATE 2: Add this to only 3rd div if you need that space in between.

    FIDDLE

提交回复
热议问题