Czy próbujesz zawijać tekst wokół obrazu, jak w zwykłych <p>tagach itd., Ale wspomniałeś również <textarea>, że może to być zupełnie inny problem. Dlaczego nie opublikujesz swojego kodu HTML, jeśli go masz? Dziękuję Ci.
<divclass="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>
Dodatek do odpowiedzi BeNdErR : Element „other TEXT” powinien mieć na float:noneprzykład:
<divstyle="width:100%;"><divstyle="float:left;width:30%;background:red;">...something something something random text</div><divstyle="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>
Jeśli rozmiar obrazu jest zmienny lub projekt jest responsywny , oprócz zawijania tekstu, możesz ustawić minimalną szerokość akapitu, aby nie stał się zbyt wąski.
Podaj niewidoczny pseudoelement CSS o żądanej minimalnej szerokości akapitu. Jeśli nie ma wystarczającej ilości miejsca, aby zmieścić ten pseudoelement, zostanie on wepchnięty pod obraz, zabierając ze sobą akapit.
Myślę, że twoja odpowiedź może zaoszczędzić mi trochę bekonu. Miałem problem z układaniem się lewych pływających obrazów w responsywnym projekcie. Przy mojej domyślnej szerokości obrazu wynoszącej 30% i obrazach po obu stronach mogłem czasami mieć kolumnę tekstową o szerokości tylko 4 znaków.
Używamy plików cookie i innych technologii śledzenia w celu poprawy komfortu przeglądania naszej witryny, aby wyświetlać spersonalizowane treści i ukierunkowane reklamy, analizować ruch w naszej witrynie, i zrozumieć, skąd pochodzą nasi goście.
Kontynuując, wyrażasz zgodę na korzystanie z plików cookie i innych technologii śledzenia oraz potwierdzasz, że masz co najmniej 16 lat lub zgodę rodzica lub opiekuna.