DIV tag creating new line in php

后端 未结 5 1297
清歌不尽
清歌不尽 2021-01-29 00:20

I am trying to style results from database but when I echo

it is creating new line after each result. How can I force the div not to create a new line?<
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-29 01:09

    you can either display the div as inline-block or set float: [left|right]

    Using inline style

    style="display: inline-block;"
    
    style="float: left;"
    

    using css

    .message {
       display: inline-block;
    }
    
    .message {
       float: left;
    }
    

提交回复
热议问题