Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS accross platforms

Status
Not open for further replies.

axman505

Technical User
Jun 20, 2001
489
US
I have a page im working on, the text look find in IE on the pc, however when i test it on the mac, the font is substantially smaller. What is the best way to fix this?
 
What units have used for [tt]font-size[/tt]?

What's the screen resolution on the Mac? On the PC?

[tt]________________________________________________________________
[pc2]Roger
Life is a game of cards in which the deck contains only jokers.[/tt]
 
Both are 1280 X 1024 .. basicalyl IE on the PC loads the text ok. But every other browser, both pc and mac, loads it smaller. Is there any chunk of web code allowing for the default font size in IE for the pc to be changed? .. Or is there a better way to do this besides loading a seperate style sheet for each browser?
 
You can't change the user's default but there is a setting in IE for the user to prevent overriding of the font size by pages. Also, some fonts (even if TrueType) seem not to allow certain sizes to be rendered consistently. Have you tried setting the [tt]font-size[/tt] property in CSS to pixels instead of points:
Code:
   p {
      font-size: 10px;
   }
to see if the problem still happens. How significant is the size difference?

[tt]________________________________________________________________
[pc2]Roger
Life is a game of cards in which the deck contains only jokers.[/tt]
 
that does work, but then for some reason if someone would wish to increase the text size, it will not increase.
 
IE on the PC refuses to increase the text size when it is set to a px
 
The following works fine for me:
Code:
<html>
   <head>
      <title>Test</title>
      <style type=&quot;text/css&quot;>
         p {
            font-family: Verdana, Arial, Helvetica, sans-serif;
         }
         p.a {
            font-size: 8px;
         }
         p.b {
            font-size: 10px;
         }
         p.c {
            font-size: 12px;
         }				
      </style>
   </head>
   <body>
      <p class=&quot;a&quot;>test</p>
      <p class=&quot;b&quot;>test</p>
      <p class=&quot;c&quot;>test</p>
   </body>
</html>
What [tt]font-family[/tt] are you using? If none, then what's the default font names in IE and the other browsers.


[tt]________________________________________________________________
[pc2]Roger
Life is a game of cards in which the deck contains only jokers.[/tt]
 
font-family: Arial, Helvetica, sans-serif;
 
The Mac version of IE displays text smaller than the windows version by default... You have to turn the text size to 120% to get a similar-sized match. I believe this has something to do with the DPI (72/96?)...

Also, it seems that all browsers I've tried on both Mac OS and Windows seem to let you change fixed-pixel size text (using px), except IE for windows.

I also seem to remember reading that IE ships with 'Smaller' text size selected out-of-the-box, and you have to switch to 'Medium' manually... Then again, 'Smaller' and 'Medium' are hardly good indications of the % of scaling that occurs at those sizes ;o)

If you use something like 0.8em of 1em for your main text size, it won't look too out of place on most browsers, I'd say.

Hope this helps!

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top