Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tmn

macrumors newbie
Original poster
Mar 13, 2004
3
0
Hello. I actually have a PC right now because I can't afford a Mac yet, but I teach a web design class at a school that has Panther OS Macs in the classroom. I was attempting to demonstrate to my class how you can control the size of your text to be fixed regardless of the user's settings with CSS. Specifically, I was using this code:

body,td{
color: #333333;
background-color: #E2E1D9;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}

However, when I pulled up the web page in the browser, and changed the text zoom to 300%, fully expecting the text size to stay fixed.... it got way bigger. That was a bit embarrassing.

I was using IE, and unfortunately didn't think to try it in Safari, so I'll have to try that when I go back to school on Monday. But does anyone have any insight for me as to why this happened, and if there's a way to correct it?

Thanks much in advance for any help you might have for me! :)
 
Here's the deal...

IE/Win does not resize text set with CSS as pixels, while almost all other browsers with decent standards compliance will.

Why would you want to force users to see text at a certain size, anyway? That kinda goes against some pretty low-level usability tenets.
 
thanks for that info

Thanks for the reply. :)

I was taught that the text size is just controllable - period - with CSS.

I understand though that it very user-friendly for folks with disabilities to lock in that size, I was just trying to demonstrate a point.

Anyway, thanks again - you learn something new every day!!

Rower_CPU said:
Here's the deal...

IE/Win does not resize text set with CSS as pixels, while almost all other browsers with decent standards compliance will.

Why would you want to force users to see text at a certain size, anyway? That kinda goes against some pretty low-level usability tenets.
 
I read somewhere that it is better to use "points" to set font size. Is that true? Would IE have worked like he wanted to in that case?
 
DVW86 said:
I read somewhere that it is better to use "points" to set font size. Is that true? Would IE have worked like he wanted to in that case?

IMO, points should only be used for print styles, since a "point" on screen is not a standard unit of measure. I prefer to set a percent on the body and then use ems for specific elements.

IE/Win's inability to resize text set as pixels should be considered a bug.

Here's a quick page showing a bunch of ways to set font size and how they will be resized in browsers:
http://organicallydigital.com/dev/csstext/
 
Rower_CPU said:
IMO, points should only be used for print styles, since a "point" on screen is not a standard unit of measure. I prefer to set a percent on the body and then use ems for specific elements.[/url]
YAY EMS! :D Now if I could get my site looking decent and then work on an external stylesheet, I'd be all set! :D
 
Rower_CPU said:
Here's the deal...

IE/Win does not resize text set with CSS as pixels, while almost all other browsers with decent standards compliance will.

Why would you want to force users to see text at a certain size, anyway? That kinda goes against some pretty low-level usability tenets.

Not quite - IE can resize text via CSS as pixels. Case study, a site I designed: www.icrontic.com

His CSS formatting is not working because IE does not apply text formatting CSS in body (others work however) and table columns.

A workaround would be to set a new object "table" instead.

ie:

table { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; }
 
Versello said:
Not quite - IE can resize text via CSS as pixels. Case study, a site I designed: www.icrontic.com

His CSS formatting is not working because IE does not apply text formatting CSS in body (others work however) and table columns.

A workaround would be to set a new object "table" instead.

ie:

table { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; }

I've yet to see IE/Win resize CSS text set as pixels. I'll check it out from a PC at work tomorrow to see if your site works as you say it does. :)
 
well...

Looks like at least I've inspired some healthy discussion!!

Glad to be a part of the forum. :p
 
Rower_CPU said:
I've yet to see IE/Win resize CSS text set as pixels. I'll check it out from a PC at work tomorrow to see if your site works as you say it does. :)

I wouldn't have made it like this if it didn't work :D
 
Versello said:
I wouldn't have made it like this if it didn't work :D

But, well-known web designers wouldn't be writing articles like this if it did. ;)

If a designer uses a unit like pixels to define font size, a majority of users won’t be able to scale the text because Internet Explorer for Windows does not increase text size in the same way as some other browsers. Whereas Mozilla and Opera will scale text that is set using pixels, IE Windows will not.

edit - Here's the screenshot of my test page set to largest in IE6. Note that the pixels and points paragraphs did not resize correctly. Also, here are screenshots of your page at the medium and largest settings
 

Attachments

  • ie-win-text.gif
    ie-win-text.gif
    8.4 KB · Views: 165
  • icrontic.gif
    icrontic.gif
    28.1 KB · Views: 149
Rower_CPU said:
edit - Here's the screenshot of my test page set to largest in IE6. Note that the pixels and points paragraphs did not resize correctly. Also, here are screenshots of your page at the medium and largest settings


You're right, they don't resize properly because they're fixed. It's purely my own preference to keep a consistent design with what I had in mind throughout their site. I've never had/heard any problems with usability with fixed font sizes. That article does however mention some interesting points.

But anyways, resizing via pixels work, 'nuff said.
 
Versello said:
You're right, they don't resize properly because they're fixed. It's purely my own preference to keep a consistent design with what I had in mind throughout their site. I've never had/heard any problems with usability with fixed font sizes. That article does however mention some interesting points.

But anyways, resizing via pixels work, 'nuff said.

OK, I misinterpreted your post. You're exploiting IE/Win's bug to force a pixel size on your users. I thought you were saying IE/Win resized it fine.

Glad we cleared that up...:)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.