2

I was reading a book about javascript (Javascript & jQuery: The Missing Manual) and when I tried an example from the book I realized that Firefox does not display the strong tag. All other browsers (Chrome, Safari) have no problem displaying it. Searching the css file of the html page I saw that the author has done a css reset (including the strong tag) and then he declared strong like this :

strong {
    font-family: 'ColaborateMediumRegular', Arial, sans-serif;  
}

Maybe if he had added font-weight: bold; inside the new definition he could overcome this problem. My question is whether there is a reset file that include all these little missing details and works with all major browsers. Thank you.

skiabox
  • 3,449
  • 12
  • 63
  • 95

2 Answers2

5

CSS reset snippets are not meant to be used strictly and can be altered to your specific needs.

Just remove the strong selector from the reset definition and the behavior will work as you intended. Or, override the resets' definition with:

strong {
    font-family: 'ColaborateMediumRegular', Arial, sans-serif;
    font-weight: 700;
}
thirtydot
  • 224,678
  • 48
  • 389
  • 349
Alex
  • 34,899
  • 5
  • 77
  • 90
2

The description “Firefox does not display the strong tag” was probably meant to say that Firefox renders strong elements in normal font weight, not bold. This is exactly what “css reset” is supposed to do: to reset rendering so that browser defaults are not used, so that author-supplied CSS code can start from a clean board, so to say. The author may wish to render strong elements using a distinctive color or background or some other method(s). Bolding, if desired, would have to be specified explicitly.

Without seeing the specific “css reset” code and the HTML page used it is impossible to say why the reset did not work on some browsers.

It is possible that ColaborateMediumRegular is supposed to refer to an embedded (@font face) font, which looks distinctive enough. Font embedding is known to have browser dependencies.

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390
  • That's exactly what happened. Here you can see the complete css file : http://pastebin.com/mm8L9SRk – skiabox Feb 06 '12 at 21:02
  • I think I found the reason for this firefox problem, right here in stack overflow. Here is the link : http://stackoverflow.com/questions/2856502/css-font-face-not-working-with-firefox-but-working-with-chrome-and-ie I've already tried the config command in firefox's about:config and now the local file is being displayed properly with the strong tag working again. – skiabox Feb 06 '12 at 22:33
  • Cannot reproduce, since the font files are missing. In any case, this does not seem to have much to do with `strong` tags and CSS resets; rather, it is a matter of web fonts. – Jukka K. Korpela Feb 06 '12 at 22:48