Home › Forums › CSS › How can I position the div right to the image? › Reply To: How can I position the div right to the image?
July 22, 2017 at 9:46 am
#256991
Beverleyh
Participant
Change the display
property to inline-block
on .box-content
?
A div is a block-level element so it wants to occupy its own line, that’s why it’s dropping down to the line below.
You can change its default block-level state to make it fall inline with other inline elements (like the img), or maybe not even use a div at all. Maybe a span would be more appropriate in this case?