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)

Menu