Browser won't relect font-size from style cheet | | |
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 ;
} | | | | re: Browser won't relect font-size from style cheet
Daniel Kaplan wrote:
[color=blue]
> 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;[/color]
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 ...
[color=blue]
> font-size: 14pt;[/color]
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%;
[color=blue]
> ...entire style sheet...[/color]
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 | | | | re: Browser won't relect font-size from style cheet
Daniel Kaplan wrote:
[color=blue]
> 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?[/color]
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.
[color=blue]
> font-size: 14pt;[/color]
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 | | | | re: Browser won't relect font-size from style cheet
"David Dorward" <dorward@yahoo.com> wrote in message
news:doq1f8$lpe$1$8302bc10@news.demon.co.uk...
[color=blue]
>
> 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.
>[color=green]
>> font-size: 14pt;[/color]
>[/color]
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! | | | | re: Browser won't relect font-size from style cheet
Daniel Kaplan wrote:
[color=blue]
> "David Dorward" <dorward@yahoo.com> wrote in message
> news:doq1f8$lpe$1$8302bc10@news.demon.co.uk...
>[color=green]
>>
>> 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.
>>[color=darkred]
>>> font-size: 14pt;[/color]
>>[/color]
>
> Ok, forgetting the POINT issue right now, here it is, in the simplest form:[/color]
...but don't forget for long.
[color=blue]
> www.warptv.com/ctest.html
> www.warptv.com/zstyles.css[/color]
BODY, TD
{
font-size: 24pt;
font-family: sans-serif, serif, monospace;
color: red;
}
[color=blue]
> Oh god, please help![/color]
He's still busy with the holidays.
--
-bts
-Warning: I brake for lawn deer | | | | re: Browser won't relect font-size from style cheet
"Beauregard T. Shagnasty" <a.nony.mous@example.invalid> wrote in message
news:dynuuutgoqet.1anvkger5jm62$.dlg@40tude.net...
[color=blue]
> BODY, TD[/color]
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 | | | | re: Browser won't relect font-size from style cheet
Daniel Kaplan wrote:
[color=blue]
> "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> wrote in message
> news:dynuuutgoqet.1anvkger5jm62$.dlg@40tude.net...
>
>[color=green]
>>BODY, TD[/color]
>
>
> 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
>
>[/color]
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 | | | | re: Browser won't relect font-size from style cheet
Beauregard T. Shagnasty wrote:
[color=blue][color=green][color=darkred]
>>> Without a URL? Its difficult to say. At a wild guess, you have something
>>> which isn't inheriting the font size.[/color][/color][/color]
[color=blue][color=green]
>> www.warptv.com/ctest.html[/color][/color]
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 |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,471 network members.
|