PDA

View Full Version : CSS fixed text size not working in mac IE




tmn
Mar 13, 2004, 10:20 PM
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! :)



Rower_CPU
Mar 14, 2004, 05:57 AM
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.

tmn
Mar 14, 2004, 09:21 AM
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!!

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.

DVW86
Mar 14, 2004, 12:43 PM
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?

Rower_CPU
Mar 14, 2004, 02:45 PM
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/

Counterfit
Mar 14, 2004, 03:43 PM
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

Versello
Mar 14, 2004, 07:15 PM
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; }

Rower_CPU
Mar 14, 2004, 08:55 PM
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. :)

tmn
Mar 14, 2004, 08:57 PM
Looks like at least I've inspired some healthy discussion!!

Glad to be a part of the forum. :p

Versello
Mar 14, 2004, 09:11 PM
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

Rower_CPU
Mar 14, 2004, 09:27 PM
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 (http://alistapart.com/articles/elastic/) 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

Versello
Mar 14, 2004, 10:43 PM
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.

Rower_CPU
Mar 15, 2004, 02:49 AM
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...:)