PDA

View Full Version : CSS Font-Size


aestronza
11-02-2005, 01:41 PM
I am currently working on a redesign for my employer of their Intranet and am trying to implement CSS on a very small scale. After the fact, I decided to change the font from Times New Roman, Serif, to Arial, Sans Serif. However, when I changed it, the Arial font is defaulting to it's normal Arial size, as though I have not specified a size.

I have played around with the size making it really small and really large in the CSS JUST to see if I can get something to happen; NOTHING! :angry: So you will see in my CSS the font-size is set pretty large. Unfortunately the CSS is totally ignoring my request!!! :angry:

Specifically, I am trying to change the body font-size to one size down from Dreamweaver MX's default size, of the arial typeface and I just cannot do it! <span style='color:red'>PLEASE HELP</span>! :blink:

Here is the CSS:

<span style='color:blue'>h2 {
font-family: Arial, Helvetica, sans-serif;
color: #FEF98C;
font-size: 16px;
}
h3 {
font-family: Arial, Helvetica, sans-serif;
color: #004263;
}
h4 {
font-family: Arial, Helvetica, sans-serif;
color: #418DB3
}
body {
font-family: Arial, Helvetica, sans-serif;
color: #004263;
font-size: 25px;
background-color: #2F6580;
background-position: top;
margin-top: 0
}
link {
font-family: "times new roman", times, serif;
color: #004263;
text-decoration: none;
}
table {
vertical-align: top;
background-position: center top;
background-color: #C1DAE6;
}</span>

domedia
11-02-2005, 02:48 PM
Your CSS is not ignoring anything. CSS is not a programming language or anything similar that *does* anything. It's simply a list of rules as to how the HTML tags should look. :)

Your problem lies in how your browsers renders/interprets your CSS. You're not giving all the code, but my guess is that you're declaring DOCTPE. Without a proper doctype, you're not telling the browser to which standard it should render your page.

I suggest you use html 4.01 strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


Apart from that, your CSS code is valid, nothing is wrong with it.

aestronza
11-02-2005, 03:22 PM
Thank you for such a quick response!

The CSS is an external CSS which I have attached to all of the pages in the site. Although I do not have the site totally updated, remotely, here is a link to the site.

Intranet Site ('http://www.secretgem527.com/portfolio/deborah/intranet/index.html')

Are you suggesting that the code you posted as a reply go in the pages, or the CSS? I'm totally ignorant when it comes to CSS. I'm trying to force myself to use it, and right now I'm only using it for formatting.

So, for now, below is the entire external CSS file:

<span style='color:blue'>h2 {
font-family: Arial, Helvetica, sans-serif;

color: #FEF98C
; font-size: 16px;
}
h3 {
font-family: Arial, Helvetica, sans-serif;
color: #004263;
}
h4 {
font-family: Arial, Helvetica, sans-serif;
color: #418DB3
}
body {
font-family: "Times New Roman", Times, serif;
color: #004263;
background-color: #2F6580;
background-position: top;
margin-top: 0
}
link {
font-family: "times new roman", times, serif;
color: #004263;
text-decoration: none;
}
table {
vertical-align: top;
background-position: center top;
background-color: #C1DAE6;
}</span>

I know ... I have ALOT to learn. :(

domedia
11-02-2005, 04:04 PM
The doctype goes at the very top of your html documents like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Community</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
etc..