|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Documentation for font-size using slash
Does anyone know of a good source of documentation on notation such as the following?:
font-size: 10px/18px; I haven't found anything in my usual sources. From trying it out, I believe the second value changes the line-height. However, I'd like to see how well-supported this notation is and if there is anything else one should know when using it. Thanks. |
|
#2
|
||||
|
||||
|
It sounds like you are refering to the font-size-adjust property... it is the ratio of font height to font size... as a numeric value. It is described in complete detail here:
http://www.w3.org/TR/REC-CSS2/fonts...ont-size-adjust
__________________
The Standards! CSS 2 - CSS 3 - w3c CSS Validator - XHTML 1.1 - HTML 4.01 - w3c (X)HTML Validator - ActionScript Reference Links! Bert's Door and Lock Service | Brandon Erik Bertelsen | TextPattern |
|
#3
|
||||
|
||||
|
the best documentation is w3.org
there you can see from the css2.1 specs http://www.w3.org/TR/CSS21/fonts.html#font-shorthand this explaination of the font-shorthand: Value: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | the value after the slash refeers to the line-height property |
|
#4
|
||||
|
||||
|
I saw that also, but I don't understand the difference between breaking them up with short hand, or bringing them together as an aspect ratio... a single value... wouldn't one value be shorter?
|
|
#5
|
||||
|
||||
|
Quote:
That's not an aspect ratio. The aspect ratio is loosely the ratio between the simple lower case height and the upper case height. The number can be used to calculate equivalent subjective font sizes. For example, a font with a 0.6 aspect ratio at 10pt will have about the same readability as a 0.5 aspect ratio font at 12pt. Line height refers to the distance between the baselines of successive lines. See http://www.w3.org/TR/REC-CSS2/visud...def-line-height for the details. As Akh referenced, the 12px/14px construct is simply shorthand for {font-size: 12px; line-height: 14px;} Early on, I noticed that some browser (don't recall which—I should retest) didn't support the shorthand, so I usually specify line-height separately. cheers, gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. My html and css workshop, demos and tutorials. Ask a better question, get a better answer. |
|
#6
|
|||
|
|||
|
Good info from all -- thanks. Sorry for the delayed reply.
Gary: Let me know if you ever figure out which browser that was. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Documentation for font-size using slash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|