Pentasis wrote:
> Can anyone tell me why this happens?
>
> The HTML looks like this:
>
> <body>
> <pre><code>some text</code></pre>
> </body>
>
> If the CSS is like:
>
> body {
> font-size: 0.875em; /* computes to 14px */
> line-height: 1.5em;
> }
>
> pre {
> font-family: Consolas, "Courier New", Courier, monospace;
> white-space: pre;
> white-space: -moz-pre-wrap;
> white-space: -o-pre-wrap;
> white-space: pre-wrap;
> margin: 3em 1.5em;
> padding: 0em 1.5em;
> }
>
> code {
> font-family: Consolas, "Courier New", Courier, monospace;
> }
>
> Everything is fine and it looks the same in IE, FF, Safari and Opera.
>
> However, when I remove the font-family from the <pre> selector, Firefox
> reduces the font size to a computed value of 11.4px
I would presume that it how Gecko shows the height of the glyphs in the
<code> element by default. This is what Mozilla developers have.
"The HTML Code Element produces an inline element displayed in the
browser's default monotype font (Lucida Console)."
These links will help.
<http://developer.mozilla.org/en/docs/HTML:Element:code>
<http://developer.mozilla.org/en/docs/Category:HTML:Element_Reference>
Alan
http://css-class.com/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/