Text floating in block next to image

前端 未结 5 1389
余生分开走
余生分开走 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条回答
  •  萌比男神i
    2020-12-08 20:34

    try this.....should work

    html:

    css:

    #testDiv { float:left; width: 360px; }
    #testDiv .imgContainer { float:left; width:120px; height:90px; }
    #testDiv .textContainer { float:left; width:240px; height:90px; overflow:hidden }
    

提交回复
热议问题