skip to Main Content

I have a this kind of parent div element (display: flex) containing two children elements

  1. Text – a span element
  2. (i) Icon – a div element

When the text is only one line (not wrapped) everything is ok.
however, when it is wrapped (2+ lines) the width of the element is according the the most wide line

I do want the text to be wrapped when it’s long.

enter image description here

In the above example, i would like the (i) icon next to the NORTH.

I would like the (i) icon next to the NORTH.

2

Answers


  1. It sounds like you want the icon to behave as if it were inside the span element. Is there a reason not to put it there? Perhaps simply as an inline img not enclosed in a div?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search