Yasser Shaikh
Yasser Shaikh

Reputation: 47794

Change font family of all div/span/everything in Wordpress blog

I have a WordPress blog. I use a wide variety of fonts. Now I want to specify one font - say "Calibri" - and then all the font families for all elements on my sute change to Calibri, overriding the specified CSS.

I know I can do this by going into the stylesheet and manually finding each font family and replacing it. Is there any shortcut to do this?

Upvotes: 0

Views: 541

Answers (2)

Aram Kocharyan
Aram Kocharyan

Reputation: 20431

This isn't really a shortcut, but if you need to force font-family and don't want to remove those currently there:

* { font-family:"Calibri" !important }

This is assuming that you don't use !important for font-family anywhere else, because since * will have lower specificity the line above won't work for that element.

I would avoid overuse of !important rules, definitely restrict it to just this case if you can.

Upvotes: 1

Samuel Bierwagen
Samuel Bierwagen

Reputation: 527

Just delete all the old font-family rules, then add body{font-family:"Calibri"}.

Upvotes: 0

Related Questions