Yukii's Blog

  • Scraps
  • V2

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
ARIES と fuzzy check pointing
Mac とシリアルコンソールまわり

関連記事

Viewport や Scroll の外側がどうなっているのかを確認する方法

cssgoogle-chrome-devtools

2022/2/20

caniuse.com におけるアスタリスク(*)の意味

csshtml5

2022/2/17

css のレイアウトに指定に関する備忘録

css

2021/5/15

自分用 css のレイアウト決定のフローチャート

cssbootstrap

2021/5/15

About

エンジニアです。 株式会社シンシアで CTO をやっています。 個人の技術メモがメインで、会社とはあんまり関係がありません。

Popular

  • Mac で mds_stores が重い問題に正しく対処する
  • "[vite]: Rollup failed to resolve import" の対応
  • Nginx の log_format を変更したけれども反映されずハマった話
  • WebSocket 接続が 1006 で終了するときのデバッグ方法
  • useAsyncData とそれを実現する Nuxt 3 の非同期処理の機構

Feed

Tags

Archives

  • 2023(49)
  • 2022(67)
  • 2021(36)
    • 2021/12 (12)
    • 2021/11 (4)
    • 2021/10 (2)
    • 2021/9 (6)
    • 2021/7 (1)
    • 2021/6 (1)
    • 2021/5 (9)
    • 2021/4 (1)
  • 2020(13)
  • 2019(19)
  • 2018(1)

© 2018-2022 Yukii