How can I keep text on the same line as an icon?

Millenial2020
  <div className={'bg-blue-700 flex flex-row p-5 items-center justify-between'} >
     <div>
        <IconButton className={'bg-blue-900 p-5 hover:bg-blue-900 '}>
            <Phone className={'text-white'} />
        </IconButton>
        <div className="text-white">John Doe</div>
      </div>
      <div>
          
      </div>
</div>

The problem its John Doe its going to the next row.

enter image description here

This is the look I want to achieve.

enter image description here

thank you in advance.

Johannes

remove the div tag that wraps the icon and the name elements, so that those are direct children of the flex div. The way you have it now only that in-between wrapper div is a flex item, its children won't be affected by the flex setting of their grandparent element.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I align a Material icon & header text on the same line?

How can I keep spans in the same line vertically?

How to display text and icon on the same line

How to put the icon and the text in the same line

How can I put regular text and animated text on the same line?

Gratient Module how can i print text in the same line

Keep symbol and text on same line?

How can I keep those three words of this anchor element in the same line?

How can I make a button with text and icon in different colors but same colors in hover state?

How to display glyphicon icon in the same line as subsequent text

how to keep text box and button in the same line in html

How do I align text in the same line?

How do I put icon and text paragraph in one line?

How can I replace multiple 3 line blocks of text in a file with a single line of text containing the same data in Python

How do I make the google material icon height the same as the text?

put icon and text in same line, opposite ends

Why do the icon and text come in same line?

Text and icon on the same line with Tailwind CSS?

How can I print to the same line?

CSS: How can I put the i icon next to the text

How can I Combine Regular and Italicized Text in the same line in iText 7?

How can I print text in two different colours (console) on the same line?

How can I put my semicolon on same line on rich text box?

How can I use grep in a loop and add new line of text each time to the same file?

How do I keep my text on one line in Firefox?

How can I attach the image or icon on edge of google line chart

How can i read the text from richTextbox and keep the format of the text?

How can I load the same icon as used by MessageBox on Windows 10?

How can I create an ol with a li element so that if I create a text node, it can be adding with ordered numbers on the same line in JS