By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,805 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,805 IT Pros & Developers. It's quick & easy.

Browser won't relect font-size from style cheet

P: n/a
I have the item below at the top of my style sheet. And it seems that
the font-szie is ignored. I know that my linked style sheet is being
read, and used because if I remove the font-family line, the font
changes. But it appears that no matter what I do with the font-size,
it is ignored, and I cannot figure out why!

Any clues? At the very bottom is the entire style sheet, just incase
anyone comes accross something that they feel is overriding the BODY
command, you can let me know.

Thanks.

p.s. One more thing, this happens on all browsers, yet if I select the text
out of the browser and copy it to word, it will be in the proper size as
reflected by my style sheet. Is there some setting that has to be turned
off via some meta tag?

BODY
{
font-family: sans-serif, serif, monospace;
font-size: 14pt;
}
....entire style sheet...

BODY
{
font-family: sans-serif, serif, monospace;
font-size: 14pt;
}
..justRed
{
color: red;
}

..smallRed
{
color: red;
font-size: 10pt;
}

DIV.editChoice
{
background:#4FAAFF;
}

DIV.delChoice
{
background:#F95585;
}

DIV.lostChoice
{
background: #FEBA35;
}

A:link
{
text-decoration: none;
color: blue;
font-variant: small-caps;
}

A:visited
{
text-decoration: none;
color: blue;
font-variant: small-caps ;
}
A:hover
{
text-decoration: none;
color: red;
font-variant: small-caps;
}
A:active
{
text-decoration: none;
color: blue;
font-variant: small-caps ;
}
EM
{
font-weight:bold;
font-style: italic ;
}

..titleBlue
{
color: blue;
font-size: 14pt;
}

..titleRed
{
color: red;
font-size: 14pt;
}

H1
{
font-family: sans-serif, serif, monospace;
font-size: larger;
color: #0B4499;

}

H2
{
font-family: sans-serif, serif, monospace;
font-size: 12pt;
color: #0B4499;

}

A.zsidemenu:link

{
text-decoration:none;
color:#FEBA35;
background:#0B4499;
font-size : 20pt;
width: 200px;
display:block;
padding-left: 5pt;
padding-right: 5pt;
padding-top: 5pt;
padding-bottom: 5pt;
font-variant: small-caps ;
}
A.zsidemenu:visited
{
text-decoration:none;
color:#FEBA35;
background:#0B4499;
font-size : 20pt;
width: 200px;
display:block;
padding-left: 5pt;
padding-right: 5pt;
padding-top: 5pt;
padding-bottom: 5pt;
font-variant: small-caps ;
}

A.zsidemenu:hover
{
text-decoration:none;
color:#FF0000;
background:#0B4499;
font-size : 20pt;
width: 200px;
display:block;
padding-left: 5pt;
padding-right: 5pt;
padding-top: 5pt;
padding-bottom: 5pt;
font-variant: small-caps ;
}

A.zsidemenu:active

{
text-decoration:none;
color:#FEBA35;
background:#0B4499;
font-size : 20pt;
width: 200px;
display:block;
padding-left: 5pt;
padding-right: 5pt;
padding-top: 5pt;
padding-bottom: 5pt;
font-variant: small-caps ;
}

/* OWNER MENU*/
..goldBorder
{
font-family: sans-serif, serif, monospace;
text-decoration:none;
color: #FEBA35;
font-size : 12pt;
font-weight: 700;
text-align: center;
vertical-align: middle;
white-space: nowrap;
}

..redBorderTop
{
font-family: sans-serif, serif, monospace;
text-decoration:none;
color: #F90030;
font-size : 12pt;
font-weight: 700;
text-align: center;
vertical-align: middle;
white-space: nowrap;
}

..redBorderBottom
{
font-family: sans-serif, serif, monospace;
text-decoration:none;
color: #F90030;
font-size : 12pt;
font-weight: 700;
text-align: center;
vertical-align: middle;
white-space: nowrap;
}
A.zsubsidemenu:link

{
text-decoration:none;
color:#FEBA35;
background:#0B4499;
font-size : 16pt;
width: 200px;
display:block;
font-variant: normal ;
}
A.zsubsidemenu:visited
{
text-decoration:none;
color:#FEBA35;
background:#0B4499;
font-size : 16pt;
width: 200px;
display:block;
font-variant: normal ;
}

A.zsubsidemenu:hover
{
text-decoration:none;
color:#0B4499;
background:#FEBA35;
font-size : 16pt;
width: 200px;
display:block;
font-variant: normal ;
}

A.zsubsidemenu:active

{
text-decoration:none;
color:#FEBA35;
background:#0B4499;
font-size : 16pt;
width: 200px;
display:block;
font-variant: normal ;
}
Dec 27 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Daniel Kaplan wrote:
I have the item below at the top of my style sheet. And it seems that
the font-szie is ignored. ...

BODY
{
font-family: sans-serif, serif, monospace;
Why can't you make up your mind? :-) That line should read something
like:

font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;

Never mix serif and sans-serif ...
font-size: 14pt;
Set sizes in percentages rather than points (which is for print media)
or pixels. Internet Explorer cannot resize for those with vision
problems.

font-size: 100%;
...entire style sheet...

snipped.

Go through the style sheet and change all the points to an appropriate
number of percentages - but do remember that the C of CSS is Cascading,
so you only need to set things like h1, h2, to an appropriately larger
percentage, and legalese to maybe 85% or so.

Oh, did you mean Microsoft Word? The third-worst HTML editor known to
man?

4. Microsoft FrontPage
3. Microsoft Word
2. Microsoft Excel
1. Microsoft Publisher

--
-bts
-Warning: I brake for lawn deer
Dec 27 '05 #2

P: n/a
Daniel Kaplan wrote:
I have the item below at the top of my style sheet. And it seems that
the font-szie is ignored. I know that my linked style sheet is being
read, and used because if I remove the font-family line, the font
changes. But it appears that no matter what I do with the font-size,
it is ignored, and I cannot figure out why!

Any clues?
Without a URL? Its difficult to say. At a wild guess, you have something
which isn't inheriting the font size. So the size is being applied to the
body, but not to something inside it. A URL would make it much easier to
debug.
font-size: 14pt;


Avoid point units on screen.

* Most systems are not configured to correctly represent points on screen
* They ignore whatever preferences the user has set for their font size
* Internet Explorer users have to jump through some nasty hoops in order to
resize them (e.g. if you've picked a size too small for the user to read).

I suggest sticking to percentages or ems (with 100% (the user's preference)
as the size of body text).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Dec 27 '05 #3

P: n/a

"David Dorward" <do*****@yahoo.com> wrote in message
news:do*******************@news.demon.co.uk...

Without a URL? Its difficult to say. At a wild guess, you have something
which isn't inheriting the font size. So the size is being applied to the
body, but not to something inside it. A URL would make it much easier to
debug.
font-size: 14pt;

Ok, forgetting the POINT issue right now, here it is, in the simplest form:

www.warptv.com/ctest.html
www.warptv.com/zstyles.css

Oh god, please help!
Dec 27 '05 #4

P: n/a
Daniel Kaplan wrote:
"David Dorward" <do*****@yahoo.com> wrote in message
news:do*******************@news.demon.co.uk...

Without a URL? Its difficult to say. At a wild guess, you have something
which isn't inheriting the font size. So the size is being applied to the
body, but not to something inside it. A URL would make it much easier to
debug.
font-size: 14pt;


Ok, forgetting the POINT issue right now, here it is, in the simplest form:


...but don't forget for long.
www.warptv.com/ctest.html
www.warptv.com/zstyles.css
BODY, TD
{
font-size: 24pt;
font-family: sans-serif, serif, monospace;
color: red;
}
Oh god, please help!


He's still busy with the holidays.

--
-bts
-Warning: I brake for lawn deer
Dec 27 '05 #5

P: n/a
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:dy*****************************@40tude.net...
BODY, TD


why? why must I specify this is for cells? I mean BODY should be all
encompassing, no?

not that i am not grateful, but i want to learn as well! and I have to say
that the tutorial I have been using online makes no mention of this.

i appreciate it tho.

Although, wait again. Why must TD have been specified for the "size" to
work, when the color and face would work all the way through?!?!?!?!

See my confusion?

p.s. You really don;t have to teach me, just point out a good link to me.

Daniel
Dec 27 '05 #6

P: n/a
Daniel Kaplan wrote:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:dy*****************************@40tude.net...

BODY, TD

why? why must I specify this is for cells? I mean BODY should be all
encompassing, no?

not that i am not grateful, but i want to learn as well! and I have to say
that the tutorial I have been using online makes no mention of this.

i appreciate it tho.

Although, wait again. Why must TD have been specified for the "size" to
work, when the color and face would work all the way through?!?!?!?!

See my confusion?

p.s. You really don;t have to teach me, just point out a good link to me.

Daniel

Daniel,

Here's one reference:
http://developer.mozilla.org/en/docs...in_Quirks_Mode.

The sample you provided has no DOCTYPE at all, which is bad practice.
Before you do anything else, stick the following single line at the top
of your HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

If it fixes the problem, congratulations. If not, well, Beauregard's
solution will always work. In any case, leave the DOCTYPE in place, as
it will prevent a host of other fascinating and creative effects from
appearing.

Chris Beall

Dec 27 '05 #7

P: n/a
Beauregard T. Shagnasty wrote:
Without a URL? Its difficult to say. At a wild guess, you have something
which isn't inheriting the font size.
www.warptv.com/ctest.html


In quirks mode the default font size of <table> is not 100% or inherit in
many browsers, so, as predicted, it isn't inheriting the font size.

Set:

table { font-size: 100%; }

or use a Doctype that triggers Standards mode (I suggest the latter).

http://gutfeldt.ch/matthias/articles/doctypeswitch.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Dec 27 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.