Text floating in block next to image

前端 未结 5 1371
余生分开走
余生分开走 2020-12-08 20:03

I would like to achieve the following placement:

Two different texts (in block) floating / inline next to image. (Everything inside div).

I have been trying

5条回答
  •  有刺的猬
    2020-12-08 20:25

    Hi why used to float left you can do this without used float as like this

    "/>
    TITLEe

    Description

    Css

        .res {
        height:60px;
        background-color:yellow;
        border-bottom:1px solid black;
    }
    img, .text{
    vertical-align:top;
    }
    .text{
    display:inline-block;
    }
    p, h5{
    margin:0;
      padding:0;
    }
    

    Live demo

    and change to css, class according to your design

提交回复
热议问题