Hi,
Generally we use font size in pixels @ CSS file like
font-size: 12px;
, but i have seen in some of css file font-size using "slash" like
font-size: 17px/12px
Which one correct, can you explain me
Hi,
Generally we use font size in pixels @ CSS file like
font-size: 12px;
, but i have seen in some of css file font-size using "slash" like
font-size: 17px/12px
Which one correct, can you explain me
I found the explanation for the 17px/12px in this forum .According to that forum it's supposed to be font-size/line-height, but the example i saw was
font: 1.2em/1.4 "Futura Book", Helvetica, Arial, sans-serif;
Personally I've not seen either before, though I have only been doing Web Dev for about 2 years now. I also tried the second in IE and it doesn't recognize it as valid.
pixels for font sizes ?? welcome to the 80s
each generation of monitor, pixels get smaller,
17inch monitors were 800 600px, 17inch monitors are 1900 1420
12px fonts are 3x smaller, approaching too small to be readable.
W3C reccommendations are, and have been for years, ems % for layout, px for images/animations/video.
scalar dimensions auto-adjust to ;;
and are generally considered a good idea
element { font: 1.2em/1.4em sans-serif; }
is acceptible shorthand for font-size: line-height: font-family:, understood by Opera9+ firefox2+ ie8+
does not work if required dimensions are omitted
font size / line-height is unpredictable if the line-height is less than the font-size, quirks modes are all crazy
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.