Daniel Peñalba
Daniel Peñalba

Reputation: 31907

How to get the browser's default font family in CSS?

I'm new to CSS and maybe this question is trivial, but I have googled a little and I didn't find what I'm looking for.

I have declared a font-family for all my site. Now, I want to override the font family for some sections. I need the browser's default font family. How can I specify the browser's default font family in a css?

.browser-defatults {
   font-family: ?????
}

Maybe I need to ignore all styles, how could I do this?

Upvotes: 5

Views: 13990

Answers (1)

Alin P.
Alin P.

Reputation: 44386

From what I know CSS doesn't offer an option to ignore all previous user styles for a property.

A work-around to your problem may be to use a generic font-family,

font-family: serif;

and let the browser choose.

Upvotes: 4

Related Questions