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?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #256989

    This is what I’ve gotten so far:

    I would like it so that I can add text to the right of the image, and still have the image to the left and taking up the remaining space. What can I do?


    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?


    Thank you, I figured it out! :D

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.