Font size, px or %?

  powerless 20:13 26 Sep 2005

What, if any are the advantages of using px or % for the font size?




  powerless 20:16 26 Sep 2005

Of which this will be defined in my CSS.

  genuinefake 22:27 26 Sep 2005

not sure about percentages but if you use pixels then Internet Explorer will not allow users to resize text once it has been set. Most other browsers will though...

  Forum Editor 23:51 26 Sep 2005

and I could write pages about the pros and cons of the different specifications. The real answer will be determined by the use to which your site will be put - your target audience if you like.

Broadly speaking, if control over the look of your Web page is your biggest concern, then you should use pixels. Pixels are the standard unit of measure for screens and monitors, and fonts will be more precisely the size you want on the screen.

If you are concerned about accessibility, then you should use ems. Ems are sized so that the font size is relative to the parent element. In the case of most Web pages, this is the body element - and so the font is sized relative to the standard size of the browser.

  ade.h 17:04 27 Sep 2005

Does that mean that the pixel measurement doesn't respond to a visitor changing his or her browser's text size adjustment?

Is the combination of consistent text size accross platforms and user adjustability a pipe dream?

  Taran 17:19 27 Sep 2005

At the moment yes, it is a pipe dream.

Our browsers all claim full CSS support yet the closer truth is that they all support the CSS core and not the full set of formatting instructions CSS can offer.

Similarly XHTML support is a little thin on the ground by comparison to HTML 4.01 support, which is far more reliable.

Pixel font sizes can run into problems in several areas and not all browsers on all platforms have historically agreed what a pixel is - this has had some interesting results in the past...

Web developers are currently up against the wall in front of the firing squad. We have to be seen to attempt to meet the unrealistic requirements of full acessibility compliance while also offering an interesting interface through which to access information, services, goods and so on.

I am all for accessibility but I could do without the headaches it causes - I don't see things getting any easier any time soon either.

  Taran 17:26 27 Sep 2005

I should also have added that the bloated code some designers use where <font> tags contain the formatting for individual lines of text is just as prone (if not more so) to browser errors in accuratelty handling the instructions.

Even now there are still a lot of tags that only Internet Explorer, or NetScape Navigator can interpret. This holds true for plain vanilla HTML as well as other web code like CSS etc,.

One day...

  ade.h 17:43 27 Sep 2005

Based on my experience so far, I thought that it might be so. It seems strange to me that different browsers can produce different results and lack full support for certain coding standards. Perhaps the new IE7 will bring a new degree of compatability and support, and prompt others to catch up.

It certainly would seem to be a tough time to be a web designer with new coding methods like XHTML and increasing accessibility demands. Of course, if the latter can be accomodated more easily in the future, it will be a very good thing for an important minority. That goes for computing as a whole, I think, but that's a whole new subject.

I think I'll maintain my strictly amateur status!

  Taran 18:12 27 Sep 2005


It certainly isn't an instant fix for all the issues previous versions have had and from what I've seen to date it also doesn't go very far in addressing some of the most serious issues that have plagued IE and Microsoft's browser offerings for long enough.

It's an interesting product, but unless things change radically between now and release it will do little more than have people thinking:

1. Yet another Microsoft update

2. It's pretty to look at but the bottom line is that it's basically Firefox/Opera style browsing under the Microsoft banner

3. It still screws up handsomely where CSS formatting is concerned...

Should I go on ?


  ade.h 20:32 27 Sep 2005

Point taken. A band-aid solution, then, and not the first time that MS has borrowed clever ideas from other products.

  Taran 20:37 27 Sep 2005

Don't get me wrong, IE7 does have some innovations, but most of the 'new' features are, as you say, borrowed from elsewhere.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment utiliser Live Photos ?