Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

html

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?

like image 972
Daniel Peñalba Avatar asked Oct 13 '22 19:10

Daniel Peñalba


1 Answers

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.

like image 103
Alin Purcaru Avatar answered Oct 18 '22 02:10

Alin Purcaru