HTML CSS examples for CSS Layout:Flex Wrap
Wrap Text in flex
<html lang="en"> <head> <style> .flex {<!--from ww w . jav a 2s . c o m--> display: flex; align-items: center; position: absolute; right: 14%; top: 15%; width: 150px; border: 1px dashed black; } .flex .item { position: relative; height: 5rem; background: yellow; border-radius: 50%; flex: 0 0 5rem; /* NEW */ } .flex .item span { position: absolute; top: 50%; left: 50%; font-size: 25px; transform: translate(-50%, -50%); } .flex p { margin-left: 10px; } </style> </head> <body translate="no"> <div class="flex"> <div class="item"> <span>9</span> </div> <p>text here text here text here text here </p> </div> </body> </html>