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

XHTML & CSS Font-Size Oddity..

P: n/a
Hey guys, I'm sure I'm doing something dumb but can't figure out
exactly what it is... Here are details:

XHTML Transitional pages with a linked CSS page. (See the CSS bits
below) On Firefox 2.0.0.3, if I have a span with a style/class
containing a "font-size" or "font-size-adjust" in it, it appears
normally. In IE 7 (don't have any other IEs to test against at this
moment), the font-size remains unchanged, no matter what I put into
either value. An example page is here: http://tsqmadness.com/testsites/subu...ntal/_bad.html.
The linked stylesheet is here: http://tsqmadness.com/testsites/subu.../_suburban.css.
(Note that both pages may have unused values, since I've been poking
and prodding trying to get IE to do something - anything - different.
For example, in the body{}, it doesn't matter if the 'font-size' is
present or not, nor what it's set if present.)

So my question is, why is IE ignoring the font-size directive? I'm not
getting errors that I'm /aware/ of. Any tips would be appreciated. :)

Thanks!
Mike

May 18 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Scripsit co****@gmail.com:
Hey guys, I'm sure I'm doing something dumb
I might agree:
XHTML Transitional pages
Pointless.
On Firefox 2.0.0.3, if I have a span with a style/class
containing a "font-size" or "font-size-adjust" in it, it appears
normally.
Only Firefox 2 supports font-size-adjust.
In IE 7 (don't have any other IEs to test against at this
moment), the font-size remains unchanged, no matter what I put into
either value.
For font-size-adjust, that surely happens. For font-size, are you sure?

You should first validate your page and run your CSS code through the W3C
CSS checker ("CSS Validator").
So my question is, why is IE ignoring the font-size directive? I'm not
getting errors that I'm /aware/ of.
You didn't use the available checking tools.

Besides, using 9pt font size is criminal, or should be. Drop Verdana, and
you will be less tempted into such destructive moves.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 18 '07 #2

P: n/a
Jukka K. Korpela wrote:
Hey guys, I'm sure I'm doing something dumb
I might agree:
Thanks for the wonderful confirmation..
On Firefox 2.0.0.3, if I have a span with a style/class
containing a "font-size" or "font-size-adjust" in it, it appears
normally.
Only Firefox 2 supports font-size-adjust.
In IE 7 (don't have any other IEs to test against at this
moment), the font-size remains unchanged, no matter what I put into
either value.
For font-size-adjust, that surely happens. For font-size, are you sure?
You should first validate your page and run your CSS code through the W3C
CSS checker ("CSS Validator").
Yes, I'm sure to point #1. For point #2, both pass without errors OR
warning.
You didn't use the available checking tools.
Other than the CSS validator and the HTML validator, what else is
there/
Besides, using 9pt font size is criminal, or should be. Drop Verdana, and
you will be less tempted into such destructive moves.
Again, the 9pt is just me testing. If I put it at 76pt, or a %, or em,
no results. In fact, I just updated it to remove the 'font-size' 9pt
from the body tag in the CSS file. You'll note that the
'span.errmsg' (which is how I first noticed it) is the same size as
the rest of the body, despite both the 'font-size' and 'font-
size'adjust' tags. However, to appease you and testing purposes. I
removed the 'font-size-adjust' as well.

Despite your tone, thanks for your input!
Mike.

May 18 '07 #3

P: n/a
Scripsit co****@gmail.com:
Jukka K. Korpela wrote:
>>Hey guys, I'm sure I'm doing something dumb
I might agree:
Thanks for the wonderful confirmation..
You're welcome. By the way, if chat like this isn't what you want, you could
get to the point in the first sentence in your future postings.
Yes, I'm sure to point #1.
My IE seems to display texts in the same sizes as Firefox. You haven't told
which texts you see differently.

By the way, problems in font size are typically caused by CSS. This is an
HTML newsgroup.
For point #2, both pass without errors OR warning.
When I looked at them, they didn't. Maybe you have kept changing the files.
It's generally a good idea to freeze a problem page (and make any additional
tests under a different file name) after asking for help with it in public.
>Besides, using 9pt font size is criminal, or should be. Drop
Verdana, and you will be less tempted into such destructive moves.
Again, the 9pt is just me testing.
I don't believe you. It's far too common to use such font sizes in real
life.
In fact, I just updated it to remove the 'font-size' 9pt
from the body tag in the CSS file.
You did? I can still see it.
You'll note that the
'span.errmsg' (which is how I first noticed it) is the same size as
the rest of the body,
There's no span.errmsg there. You have a CSS rule for span.errormsg though.
But you have no element with class="errormsg".
However, to appease you and testing purposes. I
removed the 'font-size-adjust' as well.
I don't need to be appeased. I simply pointed out, somewhat indirectly, that
you should learn the basics of practical CSS authoring. How did you get the
idea of using font-size-adjust? Surely not from any reputable tutorial,
since it would have told you it hasn't been implemented or (if it's new)
that is has only been implemented in Firefox 2 and relatives.

ObHTML: An input field should have its label text associated with in in
markup, using <labelmarkup. Your current approach makes that impossible.
It's probably fruitless to play with the current page and try to fix it up.
It would be easier to redesign it from scratch.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 19 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.