CSS line and letter spacing

I work with a project designer. This designer, unfortunately, really got sick and is in the hospital. I am working on a design and convert it to HTML / CSS. Before leaving, the designer gave me some information about some texts. For the text they told me:

Font face: Arial, Tracking / Letter spacing: 72, Line spacing: 21

I know that in CSS I can create a class with this information. For example, I can do

.myClass { 
  font-family:Arial;
  letter-spacing:72;
}

I have two questions, although I can not understand

  • The distance between the letters is too great when I do this. This is not like the original design. Is there any single information I need to add? Is there a standard unit that I should be aware of?
  • How to get spacing between 21 (unit?) In CSS?

Thank!

+3
6

, . , 72 72- - . , :

.myClass {
    font-family: 'Arial', sans-serif;
    letter-spacing: 1.72;
    line-height: 21px;
}

-, - , % px , . , , , . , , ?

+2

Photoshop ems; Photoshop . , 72 = (72/1000) em = 0.072em. .

.

+7

.myclass {line-height: 21px}

line-height , px em, , ususal, - , , : 10 , 2, 20px

.

+3

"em" .

.

, clairesuzy.

+1

, . - . , CSS.

0

You need units, as others suggest. If you have a PSD, you can work it out there.

Personally, I get some projects where I cannot get the block size, usually because the text is rasterized or I get a flat jpeg or something like that. In these situations, I use firebug and the pixel is perfect . This imposes a design on the site that I am creating and I can customize the CSS accordingly.

0
source

All Articles