How to apply font type to everything using css

Basically, I need to configure the font wherever it is specified. How can i do this? table, div, span, p, input, you name it. Is there a way that I can do all this with 1 CSS rule that I can add?

+4
source share
3 answers

Yes there is, use it in the body element, and it will be a cascade for all children, unless you specify otherwise.

body { font-family: Arial, Verdana, sans-serif; } #tahoma { font-family: Tahoma, sans-serif; } 

Then you can override it

 <body> <div id="default"> I will inherit the body font-family, in this case Arial because no other rule has been set! </div> <div id="tahoma"> <p>Me, <span>Me</span> and <strong>Me</strong> are using Tahoma because our parent #tahoma says so.</p> </div> </body> 
+3
source

This is why it is called Cascading Style Sheets. Styles set at any level will be cascaded down. Therefore, if you set this style in the body element, every other element in the body will have the same styles.

 body { font: ...; } 
0
source

Use! important property of css.

http://webdesign.about.com/od/css/f/blcssfaqimportn.htm

Like:

 *{ YOUR_FONT_STYLE } 
-1
source