3 replies [Last post]
she
Offline
newbie
Last seen: 15 years 10 weeks ago
Joined: 2004-05-10
Posts: 2
Points: 0

Okay, first let me say that in Netscape, it doesn't do this, only in IE, so you'll probably see what I'm talking about if you look with an IE browser:

this page of my site contains the following code above the <*head*>:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

However, when I remove that piece of code, the font gets much bigger, which I don't like. It doesn't stay the font size that I specified in the CSS...an example can be seen here.

Can someone please tell me what is going on, and if it absolutely necessary to have that chunk of code for the font size to remain as specified in the CSS?

Thanks in advance.

I looking for insight rather than a solution. I have no problems with the !doctype code being there -- hope I'm not wasting anyone's time...lol Smile

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 37 weeks 1 day ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

!doctype issue (would like some insight)

Hi

Two issues.

1. Why use a doctype? Because it throws browsers into standards mode from quirks mode and makes their interpretation of css more predictable (bugs permitting). IE in standards mode expects you to set an overall font-size in the body that it can the scale from (if you use ems) for the rest of the page.

See www.alistapart.com/stories/doctype/

2. Which brings us to issue two. Font-sizes. There are as many opinions as I am years old ( Laughing out loud ). IE will force font-sizes if given points to work with as units, but the other browsers will still scale these if the user changes default text-size. Personally, I take Owen Briggs' advice:

See www.thenoodleincident.com/tutorials/typography/

Whatever you decide is up to you. Many sites have followed the advice given on these two links and haven't really come unstuck.

On the issue of fonts, the style sheet has this:

font-family: Century Gothic, Verdana, sans-serif;

You can't have spaces in the font names, so make it like this:

font-family: "Century Gothic", Verdana, sans-serif;

AND, I don't like that font (Century Gothic) when used that small. Sorry. Just my opinion.

Trevor

she
Offline
newbie
Last seen: 15 years 10 weeks ago
Joined: 2004-05-10
Posts: 2
Points: 0

!doctype issue (would like some insight)

Okay. Thanks a lot, Trevor...for your insight and opinion. I appreciate it much. Wink

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 37 weeks 1 day ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

!doctype issue (would like some insight)

she wrote:
Okay. Thanks a lot, Trevor...for your insight and opinion. I appreciate it much. Wink

Hi

No Probs.

Just remember though, it is just that, an opinion. There are no absolutes in css Laughing out loud :lol: Laughing out loud :lol:

Trevor