![]() |
|
|
|||||||
![]() |
HTML - Why does font-style not work when used in the <BODY> tag? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 Joshua Beall |
|
|
|
|
#2 |
|
Posts: n/a
|
"Joshua Beall" <> wrote in message news:iKEnb.1339$... > 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. |
|
|
|
#3 |
|
Posts: n/a
|
"Joshua Beall" <> wrote in message news:iKEnb.1339$... > 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 |
|
|
|
#4 |
|
Posts: n/a
|
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/ |
|
|
|
#5 |
|
Posts: n/a
|
On Wed, 29 Oct 2003 01:29:50 GMT, "Joshua Beall" <> 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 |
|
|
|
#6 |
|
Posts: n/a
|
"Joshua Beall" <> wrote in message news:iKEnb.1339$... > 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 |
|
|
|
#7 |
|
Posts: n/a
|
"rf" <> wrote in message
news:AKFnb.169218$... > 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 |
|
|
|
#8 |
|
Posts: n/a
|
Gazing into my crystal ball I observed "Joshua Beall" <>
writing in news:5ePnb.27581$: > "rf" <> wrote in message > news:AKFnb.169218$... >> 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 |
|
|
|
#9 |
|
Posts: n/a
|
Joshua Beall wrote:
> "rf" <> wrote in message > news:AKFnb.169218$... >> 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 |
|
|
|
#10 |
|
Posts: n/a
|
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 |
|