Я хочу створити блок тексту на зразок наступного малюнка:

Питання, чи можливо це?
<p>тегах тощо, але ви також згадали <textarea>, що може бути зовсім іншою проблемою. Чому ви не опублікуєте свій HTML, якщо у вас є такий? Дякую.
Я хочу створити блок тексту на зразок наступного малюнка:

Питання, чи можливо це?
<p>тегах тощо, але ви також згадали <textarea>, що може бути зовсім іншою проблемою. Чому ви не опублікуєте свій HTML, якщо у вас є такий? Дякую.
Відповіді:
Ви повинні мати floatсвій контейнер із зображеннями таким чином:
HTML
<div id="container">
<div id="floated">...some other random text</div>
...
some random text
...
</div>
CSS
#container{
width: 400px;
background: yellow;
}
#floated{
float: left;
width: 150px;
background: red;
}
ПІДТВОРЕННЯ
За допомогою CSS Shapes ви можете піти на крок далі, ніж просто плавати текст навколо прямокутного зображення.
Ви можете фактично обернути текст таким чином, щоб він набув форми краю зображення або багатокутника, який ви обмотуєте.
.oval {
width: 400px;
height: 250px;
color: #111;
border-radius: 50%;
text-align: center;
font-size: 90px;
float: left;
shape-outside: ellipse();
padding: 10px;
background-color: MediumPurple;
background-clip: content-box;
}
span {
padding-top: 70px;
display: inline-block;
}
<div class="oval"><span>PHP</span>
</div>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley
of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy
text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised
in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
Крім того, ось хороший список окрім статті про CSS Shapes
Доповнення до відповіді BeNdErR :
Елемент "інший TEXT" повинен мати float:none:
<div style="width:100%;">
<div style="float:left;width:30%; background:red;">...something something something random text</div>
<div style="float:none; background:yellow;"> text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text </div>
</div>
Якщо розмір зображення мінливий або дизайн чуйний , крім упаковки тексту, ви можете встановити мінімальну ширину для абзацу, щоб уникнути його занадто вузького розміру .
Надайте невидимий псевдоелемент CSS з потрібною мінімальною шириною абзацу. Якщо не вистачає місця, щоб помістити цей псевдоелемент, він буде висунутий під зображення, взявши з собою абзац.
#container:before {
content: ' ';
display: table;
width: 10em; /* Min width required */
}
#floated{
float: left;
width: 150px;
background: red;
}