Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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?

#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?