Forum Moderators: not2easy

Message Too Old, No Replies

setting base font not working!

setting the font size for body tag doesn't do effect text

         

gannawdm

8:28 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



I want to set a base font size. Some of my text is not associated with a class nor is it contained within tags (<p>,<h1>,etc.). I want this kind of text to adhere to the base font size.

I understand that this can be done by setting the font size for the body tag (and/or html tag). I have done this, but it's not working. When I change the font size in the body tag, the font size does not change. I don't understand why, because when I change the font color in the body tag, the color changes as expected. Why won't the font size change? Am I missing something here?


body {
font-family: verdana,helvetica,arial,sans-serif;
color: #000;
font-size: 14px;
background-color: #1E3351;
}

Longhaired Genius

8:34 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



Are you sure the font-size is not set elsewhere too? Like in the paragraph style or the table style.

gannawdm

9:44 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



I'm sure the font size is not set elsewhere. I have been using a test stylesheet that only has the body tag set. I have also tried

html, body {
font-size: 7px;
font-family: verdana, helvetica, arial, sans-serif;
color: white;
background-color: #1E3351;

}

I tried changing the text color to make sure that the CSS file is being read. The text color changes, so it is reading the file. This doesn't make any sense and is frustrating me.

gannawdm

10:02 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



I've even tried to set the font size within the body tag itself, but that had no effect either. Of course, I'm having no problem changing the font color, but the size won't budge.


<BODY style="font-size:7px;color:blue;">

SuzyUK

10:07 pm on Oct 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the usual minimum font-size is about 10-11px (maybe 9 in a Mac?)

but what Doctype are you using?

Suzy

gannawdm

10:20 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



I've tried many different sizes and units. This is the doc type I am using.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

gannawdm

10:22 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



I switched doctype to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

and it works now!