float がある状態でも最小の行幅を指定する方法
Published: 2021/5/21
::before
の擬似要素などによって、<p>
の直前などに高さ0の block を配置して、そこで width ないし min-width を指定する。
出典
Minimum Paragraph Widths in Fluid Layouts | CSS-Tricks
In fluid width environments, the text that wraps around floated elements can get awkwardly narrow and trap bits of text orphaned away from the rest of the paragraph. This article explains that problem in more details and offers a few solutions.
css-tricks.com
Tags: css
関連記事
Viewport や Scroll の外側がどうなっているのかを確認する方法
2022/2/20
caniuse.com におけるアスタリスク(*)の意味
2022/2/17
css のレイアウトに指定に関する備忘録
2021/5/15
自分用 css のレイアウト決定のフローチャート
2021/5/15