Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Why does font-style not work when used in the <BODY> tag? (http://www.velocityreviews.com/forums/t155524-why-does-font-style-not-work-when-used-in-the-body-tag.html)

Joshua Beall 10-29-2003 01:29 AM

Why does font-style not work when used in the <BODY> tag?
 
I am trying to make all the text on some of my pages smaller using CSS.
What I did was put an inline style setting in the <BODY> tag, as follows:

<body STYLE="font-family: Arial, Helvetica, Sans Serif; font-size:
smaller">

Now, the "font-family" portion works just fine; all my text is Arial,
instead of my system default (Times New Roman). However, no matter what I
set "font-size" to, the font size is unaffected. I have tried smaller,
small, x-small, and xx-smaller. Nothing works.

Obviously I am not doing something right. Can someone enlighten me?

-Josh



rf 10-29-2003 02:38 AM

Re: Why does font-style not work when used in the <BODY> tag?
 

"Joshua Beall" <jbeall@heraldic.us> wrote in message
news:iKEnb.1339$Q9.1027@nwrddc02.gnilink.net...
> I am trying to make all the text on some of my pages smaller using CSS.


Why? Why not just use the user settings in your browser to make the text
smaller. That way the text will be "normal" size for everybody else.

> What I did was put an inline style setting in the <BODY> tag, as follows:
>
> <body STYLE="font-family: Arial, Helvetica, Sans Serif; font-size:
> smaller">
>
> Now, the "font-family" portion works just fine; all my text is Arial,
> instead of my system default (Times New Roman). However, no matter what I
> set "font-size" to, the font size is unaffected. I have tried smaller,
> small, x-small, and xx-smaller. Nothing works.


A wild guess: You have also used tables to layout your page. Some browsers
do not inherit font size into table cells correctly. Use:

body, td {...}

and don't use those things, use percentages and nothing below 100 of them
except perhaps for a copyright notice which you want to make unreadable.

Cheers
Richard.



Paul Aitch 10-29-2003 06:58 AM

Re: Why does font-style not work when used in the <BODY> tag?
 

"Joshua Beall" <jbeall@heraldic.us> wrote in message
news:iKEnb.1339$Q9.1027@nwrddc02.gnilink.net...
> I am trying to make all the text on some of my pages smaller using

CSS.
> What I did was put an inline style setting in the <BODY> tag, as

follows:
>
> <body STYLE="font-family: Arial, Helvetica, Sans Serif; font-size:
> smaller">
>
> Now, the "font-family" portion works just fine; all my text is Arial,
> instead of my system default (Times New Roman). However, no matter

what I
> set "font-size" to, the font size is unaffected. I have tried

smaller,
> small, x-small, and xx-smaller. Nothing works.
>
> Obviously I am not doing something right. Can someone enlighten me?
>
> -Josh
>

Have you tried specifying an actual size in pixcels? e.g.:
.......font-size:20px;

Paul



David Dorward 10-29-2003 08:06 AM

Re: Why does font-style not work when used in the <BODY> tag?
 
Paul Aitch wrote:

> Have you tried specifying an actual size in pixcels? e.g.:
> ......font-size:20px;


Argh. Dear. Me. Please. No.

I'm yet to see a browser which actually gets pixels right (in CSS terms),
and preventing a user from resizing their text (OK OK, its their own fault
for using Microsoft's excuse for a browser, but lots of people make that
mistake) isn't a good idea.

--
David Dorward http://dorward.me.uk/

Sid Ismail 10-29-2003 10:33 AM

Re: Why does font-style not work when used in the <BODY> tag?
 
On Wed, 29 Oct 2003 01:29:50 GMT, "Joshua Beall" <jbeall@heraldic.us> wrote:

: <body STYLE="font-family: Arial, Helvetica, Sans Serif; font-size:
: smaller">
:
: Now, the "font-family" portion works just fine; all my text is Arial,
: instead of my system default (Times New Roman). However, no matter what I
: set "font-size" to, the font size is unaffected. I have tried smaller,
: small, x-small, and xx-smaller. Nothing works.
:
: Obviously I am not doing something right. Can someone enlighten me?


Have you got tables? then you need to specify
body, td {... }

Problem with inheritance.

URL?

Sid


David Graham 10-29-2003 12:28 PM

Re: Why does font-style not work when used in the <BODY> tag?
 

"Joshua Beall" <jbeall@heraldic.us> wrote in message
news:iKEnb.1339$Q9.1027@nwrddc02.gnilink.net...
> I am trying to make all the text on some of my pages smaller using CSS.
> What I did was put an inline style setting in the <BODY> tag, as follows:
>
> <body STYLE="font-family: Arial, Helvetica, Sans Serif; font-size:
> smaller">
>
> Now, the "font-family" portion works just fine; all my text is Arial,
> instead of my system default (Times New Roman). However, no matter what I
> set "font-size" to, the font size is unaffected. I have tried smaller,
> small, x-small, and xx-smaller. Nothing works.
>
> Obviously I am not doing something right. Can someone enlighten me?
>
> -Josh

Hi
Is that a comma after Sans Serif?
It should be a semi-colon
HTH
David



Joshua Beall 10-29-2003 01:26 PM

Re: Why does font-style not work when used in the <BODY> tag?
 
"rf" <making.it.up@the.time> wrote in message
news:AKFnb.169218$bo1.58074@news-server.bigpond.net.au...
> Some browsers do not inherit font size into table cells correctly.


Is this a bug, or does the W3C spec make this an acceptable behaviour?

-jb



Adrienne 10-29-2003 04:34 PM

Re: Why does font-style not work when used in the <BODY> tag?
 
Gazing into my crystal ball I observed "Joshua Beall" <jbeall@heraldic.us>
writing in news:5ePnb.27581$AU.4034@nwrddc01.gnilink.net:

> "rf" <making.it.up@the.time> wrote in message
> news:AKFnb.169218$bo1.58074@news-server.bigpond.net.au...
>> Some browsers do not inherit font size into table cells correctly.

>
> Is this a bug, or does the W3C spec make this an acceptable behaviour?
>
> -jb
>
>
>


The W3C makes recommendations only.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com

Toby A Inkster 10-29-2003 06:33 PM

Re: Why does font-style not work when used in the <BODY> tag?
 
Joshua Beall wrote:

> "rf" <making.it.up@the.time> wrote in message
> news:AKFnb.169218$bo1.58074@news-server.bigpond.net.au...
>> Some browsers do not inherit font size into table cells correctly.

>
> Is this a bug, or does the W3C spec make this an acceptable behaviour?


Bug.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132


Toby A Inkster 10-29-2003 06:35 PM

Re: Why does font-style not work when used in the <BODY> tag?
 
Joshua Beall wrote:

> <body STYLE="font-family: Arial, Helvetica, Sans Serif; font-size:
> smaller">


Note: Sans Serif should be "Sans Serif". You're not allowed to use font
names with spaces in them, unless you put quote marks around them.

Or perhaps you meant sans-serif (lower case, with a hyphen) which requests
that the browser uses its default sans serif font.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132



All times are GMT. The time now is 05:18 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57