?
Solved

CSS - overwrite browser font...

Posted on 2014-07-18
2
Medium Priority
?
296 Views
Last Modified: 2014-07-18
How can I globally overwrite the font type and size so that the site will have similar look using different browsers.

body{
??
}

or html{
??
}

Thank you
0
Comment
Question by:Mike Eghtebas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40204036
body{
   font-size:14px!important;
}

Open in new window


But if you also use
body{
   font-size:14px!important;
}
p:font-size:18px!important;

Open in new window


The p tag will win.  Try placing your body{foo:bar!important;} as the very last css item.
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 40204041
Actually, that is wrong. In the example below, the p will still win.  

p{font-size:18px!important;}
body{
   font-size:14px!important;
}

Open in new window

You would have to do body p to over take the p only tag.
p{font-size:18px!important;}
body p{
   font-size:14px!important;
}

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question