CSS align images and text on same line

后端 未结 9 1096
长情又很酷
长情又很酷 2020-12-05 06:16

I have been searching and trying different methods for hours now. I just can\'t seem to get these two images and text all on one line. I want both the images and both text

9条回答
  •  -上瘾入骨i
    2020-12-05 06:58

    In this case you can use display:inline or inline-block.

    Example:

    img.likeordisklike {display:inline;vertical-align:middle;  }
    h4.liketext { color:#F00; display:inline;vertical-align:top;padding-left:10px; }

    $likes

    $dislikes

    Don't use float:left because again need to write one more clear line and its old method also..

提交回复
热议问题