I'm taking a designers specs and converting them into HTML/CSS. I keep running into the same problem though - the designer will spec a rectangle with some text centered vertically in it. He'll specify the height of the rectangle at 36 pixels and the font at 18px. I'll create a 36 pixel DIV with no border and 9 pixel padding-top (using box-model built into bootstrap). The text is always too far down though. It looks like the text is bigger than 18 pixels. Taking a screenshot and measuring in Photoshop shows the text is 20 pixels high.
Am I missing something? Are pixels inconsistent from screen to screen? Is a font pixel different than a screen pixel? I've read fonts should be in points now for high DPI screens. Does it matter?
Aucun commentaire:
Enregistrer un commentaire