Click to See Complete Forum and Search --> : specify browser default font
Beach Bum
05-06-2006, 02:38 AM
I have a page where a font is specified. I want to have one <div> where the font is the browser default (what ever that is) so it matches the other pages on the site (and no, I do not want to specify a font for the other pages). So how do I override the font in the style for that <div> and tell the browser to use its default font, since I don't know for sure what font that is.
That div must not have a parent element where the font-family has been defined.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>font</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.container {font-family: "MS Serif", "New York", serif;}
</style>
</head>
<body>
<div class="container">
<!-- defined font-family -->
</div>
<div>
<!-- browser default font-family -->
</div>
<div class="container">
<!-- defined font-family -->
</div>
</body>
</html>
Beach Bum
05-06-2006, 12:10 PM
Unfortunately, that <div> does have have a parent element where the font-family has been defined (the whole page). And I cannot change that code.
I was afraid that this was impossible. But thought I would ask. Thanks for responding.
felgall
05-06-2006, 05:03 PM
I think most browsers use a serif font (eg. Times New Roman) as their default so you should be able to tell the browser to use its default font by specifying:
font-family: serif;
Beach Bum
05-06-2006, 10:09 PM
I think most browsers use a serif font (eg. Times New Roman) as their default so you should be able to tell the browser to use its default font by specifying:
font-family: serif;
that is what I have done, but I was just hoping that there was a way . . . someone could change the browser default font. that will jsut have to do.
oh well . . . thank you both for responding. now on to other issues.