6

Is it possible to have the firefox browser (or chrome) use font overrides on particular web pages?

To be specific, I'm trying to look for a way to make all the wikipedia pages display in sans-serif instead of sans.

3 Answers 3

9

If you want to override the fonts in Wikipedia specifically, edit Special:MyPage/vector.css (for the default Vector skin):

Example:

#bodyContent {
    font-family: serif;
}

This is stored in your Wikipedia account and works for all browsers. If you are using a different skin (theme), change the .css name (e.g. monobook.css).

(I assume you meant to write "display in serif instead of sans", because "sans" and "sans-serif" are the same thing.)

Example for a specific font: font-family: Garamond, "Times New Roman", serif;


For a more general solution, install the Stylish Stylus extension for Firefox or Chrome. (In Firefox, you can manually edit userContent.css.) This way you can set overrides for specific sites, or for everything.

Example for Wikipedia:

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix(http://en.wikipedia.org/) {
    #bodyContent {
        font-family: serif;
    }
}

It's mostly the same as above, but with added @namespace, and wrapped inside an @-moz-document block.

2
  • 1
    Stylish (well, at least on Firefox, can't comment on Chrome but I'd assume so) can be used on a site-by-site bases as well as universally.
    – DMA57361
    May 6, 2011 at 12:10
  • That's just awesome.
    – Blomkvist
    May 6, 2011 at 12:18
3

You can creat an account with Wikipedia and and upload your own css or select from a given list , some of which have san-serif fonts as default (myskin,nostalgia,simple,standard)

2

See grawity's answer. Otherwise,

In firefox got to tools>options>content>font>advanced settings and disallow websites to choose their own fonts.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .