The picture text is no longer displayed on the same line.

Code:

   

Mar.12,2021

you set the inline-block so that they can top it and form an inline block element, but you see that the second inline-block element has no width, and there is more text, so there is no room for the picture and text box on the line, so you change the line. You should give the second inline block an appropriate width width = (100%-imgWidth), should be fine.


img gives a width. Float:left, and then the back of the text package in a div, also give a width and float:left,


picture floating float
text floating flaot (remember to give width and height)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaf023-2225.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaf023-2225.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?