2006年4月10日のブックマーク (2件)

  • line-height の値には単位なしが良いとされる理由

    CSS で行ボックスの高さを指定する line-height 値に、em(length) や %(percentage) などの単位を付けて指定しているサイトを意外と見かける。それは間違いではないし、例えばナビゲーションとかでブロック要素の垂直センターに配置するために意図的に指定しているんであれば良いんだけれど、そうでないなら line-height 値には単位なし (number) で指定した方が良いのにとか思ったりする。その理由は Eric's Archived Thoughts: Unitless line-heights でも分かりやすく説明されているんだけど、ちと劣化コピーしてみる。 単位ありと単位なしの違い 手っ取り早く説明するために、サンプルを作ってみた。p 要素があって、その中にインライン要素の em で一部分を強調している。分かりやすいようにそれぞれの font-size

    FREDERICA
    FREDERICA 2006/04/10
  • Lifehacker, the Productivity and Software Guide

    Lifehacker has been the world’s leading guide to tech and life tips, tricks and hacks since 2005. Our job is to figure out how tech, gadgets, software and other things work, so you don’t have to. Our team of experts spend over 5,000 hours per month researching and hands-on testing into the very best answers to your biggest questions and problems.

    Lifehacker, the Productivity and Software Guide
    FREDERICA
    FREDERICA 2006/04/10