Topic: Suggestion for IE7 - CSS hack to allow text size change

Hi,

I have a suggestion that you might consider for the upcoming PunBB releases. Currently the following hack is used for IE5.x and 6 on Windows:

/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/
* HTML .pun {FONT-SIZE: 68.75%}
/* End IE Win Font Size */

However, as you might know, IE7 doesn't support the "* html" hack any more. So at the moment the text size cannot be controlled in IE7 (yes, it allows page zooming but it's not exactly the same and I wouldn't say it's that usable).

So my suggestion is to use the following IE7 specific hack in addition:

/* IE7Win Font Size only - to allow IE7Win to zoom text. */
*:first-child+html .pun {FONT-SIZE: 68.75%}

I have personally tested the hack with all Windows/Mac/Linux browsers I have access to (which includes pretty much all well-known browsers) and I can confirm that this hack is specific to IE7 and to no other browser. Furthermore, even if some future yet-unreleased browser possibly applies this rule, it most probably won't do any harm to that browser as normally 68.75% font-size corresponds to 11px.

For more info about the hack, please visit - http://nanobox.chipx86.com/blog/2006/04 … or-ie7.php

This hack has been working in all IE7 versions since Beta 2 (when the improved rendering engine was first introduced) and today I verified that it is still working in the final IE7.0. I am pretty much convinced they will not "drop support" for it in future versions and even if they do so, they promised to make the text size resizable, no matter which units are used in the future IE releases after 7.0.

Anyway, I just wanted to make this suggestion. smile

Re: Suggestion for IE7 - CSS hack to allow text size change

Sounds like a no-brainer to me, but I'll let Paul be the judge if it goes in or not.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: Suggestion for IE7 - CSS hack to allow text size change

The stylesheets for 1.3 are totally different. All the hacks are in a special stylesheet delivered via a conditional comment. The base font size is now a percentage for all browsers because there are far less browsers which still use the Gecko 1.7 rendering engine.

If by up and coming releases you meant further 1.2 releases, lets hope there aren't any. If there are I would be tempted to introduce an IE specific stylesheet and dispense with the IE5 Mac part of the hack. If its a very minor update then I would probably add that hack or something like it.

In the meantime, perhaps you could post instructions for your fix to the sticky topic I posted here
http://punbb.org/forums/viewtopic.php?id=13471
That we we have all the IE7 fixes in one place.