I''ve had to worry about how different browsers render different screen sizes for text for years. I don''t want to use "px" for font-size as IE will cripple the browsers "VIEW, Text Size" control. We need to keep the text-size browser control fully operational for accessibility and usability. At the same time, we want text-laden pages to render "approximately" the same across all browsers on page load, normal text-viewing-size. My reference on the subject has been the work of Owen Briggs: http://www.thenoodleincident.com/tutorials/box_lesson/font/index.html This work gets close, but for my purposes, it could be improved. Firefox will always renders text noticeably larger than IE and these are the two most significant browsers in our user base. The page layouts differ more than I would like. Using JavaScript, it might be possible to get a better match in IE and Firefox text-size by detecting the browser type and setStyle on the body {font-size: value} to a browser-specific setting such that the "normal" rendering size was the same across all browsers. Before I go off and invent the wheel again; has anyone seen anything like this done elsewhere? Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I didn''t see any reference to using pt for fonts. I use pt for most of my fonts and sizes seem the same across browsers. Is there some big bad reason for not using pt for fonts that I''m unaware of? On 7/5/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> > > > I''ve had to worry about how different browsers render different screen sizes > for text for years. I don''t want to use "px" for font-size as IE will > cripple the browsers "VIEW, Text Size" control. We need to keep the > text-size browser control fully operational for accessibility and usability. > At the same time, we want text-laden pages to render "approximately" the > same across all browsers on page load, normal text-viewing-size. > > My reference on the subject has been the work of Owen Briggs: > > http://www.thenoodleincident.com/tutorials/box_lesson/font/index.html > > This work gets close, but for my purposes, it could be improved. Firefox > will always renders text noticeably larger than IE and these are the two > most significant browsers in our user base. The page layouts differ more > than I would like. > > Using JavaScript, it might be possible to get a better match in IE and > Firefox text-size by detecting the browser type and setStyle on the body > {font-size: value} to a browser-specific setting such that the "normal" > rendering size was the same across all browsers. > > Before I go off and invent the wheel again; has anyone seen anything like > this done elsewhere? > > Sam > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
I also use pt on all of my sites, and it will _appear_ to be working fine. However, try and view the same site, with the same font, in the same browser, in more than one operating system and you''ll see a large (and annoying) difference. If Linux or BSD users aren''t your target user base then you may be fine, however I''ve found that text over in Linux land tends to render much differently than in Windows. With that in mind, I should really do a comparison of the different sizes so I can figure out what''s up. Despite this, I usually just "code around" the problem by providing text in a way that I can use pt and not destroy the flow/layout of my page with the differences in size. However if this isn''t an option for you, you may want to try the formatting with em''s stylesheet provided in the article you listed below. I believe that the em stylesheet provided proper results across browser and operating system. (YMMV) Final conclusion, vector fonts suck.. lets go back to monospaced fonts. :P -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Andrew Kaspick Sent: Wednesday, July 05, 2006 1:48 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Text sizing I didn''t see any reference to using pt for fonts. I use pt for most of my fonts and sizes seem the same across browsers. Is there some big bad reason for not using pt for fonts that I''m unaware of? On 7/5/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> > > > I''ve had to worry about how different browsers render different screen sizes > for text for years. I don''t want to use "px" for font-size as IE will > cripple the browsers "VIEW, Text Size" control. We need to keep the > text-size browser control fully operational for accessibility and usability. > At the same time, we want text-laden pages to render "approximately" the > same across all browsers on page load, normal text-viewing-size. > > My reference on the subject has been the work of Owen Briggs: > > http://www.thenoodleincident.com/tutorials/box_lesson/font/index.html > > This work gets close, but for my purposes, it could be improved. Firefox > will always renders text noticeably larger than IE and these are the two > most significant browsers in our user base. The page layouts differ more > than I would like. > > Using JavaScript, it might be possible to get a better match in IE and > Firefox text-size by detecting the browser type and setStyle on the body > {font-size: value} to a browser-specific setting such that the "normal" > rendering size was the same across all browsers. > > Before I go off and invent the wheel again; has anyone seen anything like > this done elsewhere? > > Sam > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
It''s been a while since I''ve researched pts, but I had to toss them years ago. Something about browser differences in rendering pts. IE will fix fonts when px are used. It''s out. Seems like ems or % are the available choices, but no setting will give you what you want / need. Which is why I''m thinking there ought to be a JavaScript to do the job. I''ll look around for one, then try to write one if nothing is out there. Sam -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Andrew Kaspick Sent: Wednesday, July 05, 2006 1:49 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Text sizing I didn''t see any reference to using pt for fonts. I use pt for most of my fonts and sizes seem the same across browsers. Is there some big bad reason for not using pt for fonts that I''m unaware of? On 7/5/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> > > > I''ve had to worry about how different browsers render different screensizes> for text for years. I don''t want to use "px" for font-size as IE will > cripple the browsers "VIEW, Text Size" control. We need to keep the > text-size browser control fully operational for accessibility andusability.> At the same time, we want text-laden pages to render "approximately" the > same across all browsers on page load, normal text-viewing-size. > > My reference on the subject has been the work of Owen Briggs: > > http://www.thenoodleincident.com/tutorials/box_lesson/font/index.html > > This work gets close, but for my purposes, it could be improved. Firefox > will always renders text noticeably larger than IE and these are the two > most significant browsers in our user base. The page layouts differ more > than I would like. > > Using JavaScript, it might be possible to get a better match in IE and > Firefox text-size by detecting the browser type and setStyle on the body > {font-size: value} to a browser-specific setting such that the "normal" > rendering size was the same across all browsers. > > Before I go off and invent the wheel again; has anyone seen anything like > this done elsewhere? > > Sam > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
What about this... http://developer.yahoo.com/yui/fonts/ On 7/5/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> It''s been a while since I''ve researched pts, but I had to toss them years > ago. Something about browser differences in rendering pts. > > IE will fix fonts when px are used. It''s out. > > Seems like ems or % are the available choices, but no setting will give you > what you want / need. > > Which is why I''m thinking there ought to be a JavaScript to do the job. > I''ll look around for one, then try to write one if nothing is out there. > > Sam > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Andrew > Kaspick > Sent: Wednesday, July 05, 2006 1:49 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Text sizing > > > I didn''t see any reference to using pt for fonts. I use pt for most > of my fonts and sizes seem the same across browsers. Is there some > big bad reason for not using pt for fonts that I''m unaware of? > > On 7/5/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > I''ve had to worry about how different browsers render different screen > sizes > > for text for years. I don''t want to use "px" for font-size as IE will > > cripple the browsers "VIEW, Text Size" control. We need to keep the > > text-size browser control fully operational for accessibility and > usability. > > At the same time, we want text-laden pages to render "approximately" the > > same across all browsers on page load, normal text-viewing-size. > > > > My reference on the subject has been the work of Owen Briggs: > > > > http://www.thenoodleincident.com/tutorials/box_lesson/font/index.html > > > > This work gets close, but for my purposes, it could be improved. Firefox > > will always renders text noticeably larger than IE and these are the two > > most significant browsers in our user base. The page layouts differ more > > than I would like. > > > > Using JavaScript, it might be possible to get a better match in IE and > > Firefox text-size by detecting the browser type and setStyle on the body > > {font-size: value} to a browser-specific setting such that the "normal" > > rendering size was the same across all browsers. > > > > Before I go off and invent the wheel again; has anyone seen anything like > > this done elsewhere? > > > > Sam > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Taking advice from the noodle incident: http://www.thenoodleincident.com/tutorials/typography/index.html For the last few years I''ve always set Body to 76% and the all other font size rules use ems. Since then I''ve not had to worry about font sizes ever again. On 06/07/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> > > > I''ve had to worry about how different browsers render different screen sizes > for text for years. I don''t want to use "px" for font-size as IE will > cripple the browsers "VIEW, Text Size" control. We need to keep the > text-size browser control fully operational for accessibility and usability. > At the same time, we want text-laden pages to render "approximately" the > same across all browsers on page load, normal text-viewing-size. > > My reference on the subject has been the work of Owen Briggs: > > http://www.thenoodleincident.com/tutorials/box_lesson/font/index.html > > This work gets close, but for my purposes, it could be improved. Firefox > will always renders text noticeably larger than IE and these are the two > most significant browsers in our user base. The page layouts differ more > than I would like. > > Using JavaScript, it might be possible to get a better match in IE and > Firefox text-size by detecting the browser type and setStyle on the body > {font-size: value} to a browser-specific setting such that the "normal" > rendering size was the same across all browsers. > > Before I go off and invent the wheel again; has anyone seen anything like > this done elsewhere? > > Sam > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >-- Andrew Tetlaw htp://tetlaw.id.au
I wrote a test scrip which I''ve included below. I was curious how Firefox and IE handled default text sizes and the user changing the text size. Here''s the beef: Default font sizes: Firefox 18px, IE 16pt. This amounts to about 2px of difference in the defaults No percentage, e.g., body {font-size:76%} will ever make IE and Firefox identical only closer. Setting the css body {font-size: 12px} or {font-size: 12pt} will cause IE to disable the browser''s "View Text Size" control. I guess this is why percentages are preferred over px/pt in CSS-only solutions. (Crippling the view text-size reduces the accessibility for persons with poor vision, or unusual monitor resolutions.). Some good news: Setting body {font-size:12px} (or any fixed size) will set both IE and Firefox identical display sizes. To avoid diminishing the accessibility, a user control should be provided on the page to increase or decrease the font-size for IE. This is the path I am planning to take since there are no other effective solutions. I''m trying to decide if a slider or some other UI mechanism e.g. plus (+) and minus(-) controls might be better or more obvious. Sam <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <style type="text/css"> body { font-family:Arial, Helvetica, sans-serif; } </style> <script type="text/javascript" src="javascripts/prototype.js"></script> </head> <body id=''body''> <div>getStyle(''body'', ''font-size'')= <span id=''getstyle''></span></div> <div id=''mydiv''></div> <script type="text/javascript"> $(''getstyle'').innerHTML = Element.getStyle(''body'', ''font-size''); var sTable = ''\n<table id="mytable" border="0" cellspacing="0" cellpadding="0" style="margin-left:50px;">''; for (var i=8; i < 20; i++) { sTable += ''\n <tr><td align="right" style="font-size:'' + i.toString() + ''px">'' + i.toString() + ''px [</td><td align="left">] '' + i.toString() + ''</td>''; sTable += ''<td align="right" style="font-size:'' + i.toString() + ''pt">'' + i.toString() + ''pt [</td><td align="left">] '' + i.toString() + ''</td></tr>''; } $(''mydiv'').innerHTML = sTable + ''\n</table>''; </script> </body> </html>
Sam wrote:> Setting the css body {font-size: 12px} or {font-size: 12pt} will cause IE to > disable the browser''s "View Text Size" control. I guess this is why > percentages are preferred over px/pt in CSS-only solutions. (Crippling the > view text-size reduces the accessibility for persons with poor vision, or > unusual monitor resolutions.).I''m not sure I understand this rational. It seems like the correct method for making a font the same size across all browsers is to used a fixed font size (px or pt). Under these situations IE is not accessible. This to me seems like a fine situation and no additional user control should be needed. The fault is in IE not your web page. If no browser existed that could make the page accessible I could understand adding a user control (sometimes you have to fill in the gaps for browsers) but since many browsers exist that can make the page accessible I don''t see why extra effort should be put forth. Especially when one of those browsers (Mozilla/Firefox) is free, high quality, cross-platform and efficient. By choosing to use IE the user is making a choice to use a non-accessible browser. That is their fault not the fault of the website. To me this is like adding an audio recording of all your pages so the page is accessible to the blind. Most developers do not do this. Most developers just make text available and rely on the user to have the proper tool to read the text (screen reader). If you are blind you need a screen reader (or some equivalent tool). Every website on the planet should not have to provide an audio recording. The same goes with fixed fonts. If you have poor vision you need a browser that will allow you to resize fixed fonts. According to your tests IE is not the proper browser for that but Firefox will work well for that. Therefore no user control should be needed. Just to be clear I''m not trying to be insensitive to the disabled. I think making accessible websites is very important. I see it as a collaboration. Web developers develop websites that allow a disabled person to access their website with preferably free or low-cost tools. But it is not the responsibility of the website developer to ensure that the site is accessible on every browser on the planet. As long as a reasonable choice of tools can view the site and the site is standards compliant I think the developer has done their job. After that it is up to the disabled user to pick a tool that will work for him/her. This is all getting a bit off topic but I welcome feedback on this. I''m not opposed to changing my view but I am just not sure we should be spending hours developing user controls (which also need to be accessible) instead of requiring the user to work with us and install a free, high quality, cross-platform tool that will do the job even better. Eric
This is an excellent point, but I part of your rational. You state that this is like providing an audio recording for the website. I''d argue that the recording exists and not making these small sacrifices is like denying it to the impaired. As designers the responsibility is ours to make sure that our target audience can access and use our pages. If our target audience has trouble navigating or reading our pages the fault lies on us, not on the browser manufacturers. After all solutions do exist for our problems. Forcing someone to upgrade to Firefox works fine in a personal setting or for an informal website which will likely be used during a user''s off time. However, what about a web based application which a user may use at work and may not be given the option of having Firefox installed on their provided computers? (As is the case with a few of my co-workers in the past). Sure this may only alienate a small portion of a site''s user base, but it''s these small details which can create passion among your users and keep them coming back for more. In my mind, if there''s a way to provide an accessible site with minimal extra effort (such as the 76% and em sizing solution) which is also cross browser and contains no hacks then it''s worth the extra few minutes. Then again a cost-benefit analysis by the bean counters upstairs might tell me that those few extra features compared to the cost of paying me for those few minutes aren''t worth diddly. Cheers. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Eric Anderson Sent: Thursday, July 06, 2006 9:23 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Re: Text sizing Sam wrote:> Setting the css body {font-size: 12px} or {font-size: 12pt} will cause IE to > disable the browser''s "View Text Size" control. I guess this is why > percentages are preferred over px/pt in CSS-only solutions. (Crippling the > view text-size reduces the accessibility for persons with poor vision, or > unusual monitor resolutions.).I''m not sure I understand this rational. It seems like the correct method for making a font the same size across all browsers is to used a fixed font size (px or pt). Under these situations IE is not accessible. This to me seems like a fine situation and no additional user control should be needed. The fault is in IE not your web page. If no browser existed that could make the page accessible I could understand adding a user control (sometimes you have to fill in the gaps for browsers) but since many browsers exist that can make the page accessible I don''t see why extra effort should be put forth. Especially when one of those browsers (Mozilla/Firefox) is free, high quality, cross-platform and efficient. By choosing to use IE the user is making a choice to use a non-accessible browser. That is their fault not the fault of the website. To me this is like adding an audio recording of all your pages so the page is accessible to the blind. Most developers do not do this. Most developers just make text available and rely on the user to have the proper tool to read the text (screen reader). If you are blind you need a screen reader (or some equivalent tool). Every website on the planet should not have to provide an audio recording. The same goes with fixed fonts. If you have poor vision you need a browser that will allow you to resize fixed fonts. According to your tests IE is not the proper browser for that but Firefox will work well for that. Therefore no user control should be needed. Just to be clear I''m not trying to be insensitive to the disabled. I think making accessible websites is very important. I see it as a collaboration. Web developers develop websites that allow a disabled person to access their website with preferably free or low-cost tools. But it is not the responsibility of the website developer to ensure that the site is accessible on every browser on the planet. As long as a reasonable choice of tools can view the site and the site is standards compliant I think the developer has done their job. After that it is up to the disabled user to pick a tool that will work for him/her. This is all getting a bit off topic but I welcome feedback on this. I''m not opposed to changing my view but I am just not sure we should be spending hours developing user controls (which also need to be accessible) instead of requiring the user to work with us and install a free, high quality, cross-platform tool that will do the job even better. Eric _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I''m not sure I understand this rational. It seems like the correct method for making a font the same size across all browsers is to used a fixed font size (px or pt). Under these situations IE is not accessible. This to me seems like a fine situation and no additional user control should be needed. The fault is in IE not your web page. Good point, but I develop web pages for customers who require accessibility in the contract. IE is part of the mix of browsers. I have to chop stones in the pit the way I''m told. Sam
Bauser, Joseph (Joe) wrote:> time. However, what about a web based application which a user may use > at work and may not be given the option of having Firefox installed on > their provided computers? (As is the case with a few of my co-workers in > the past).I understand companies have policies about installing unapproved 3rd party software. But most sane companies should have some channel to get software approved that is needed. If they have hired a disabled person who has low vision problems and they are unwilling to let that user install software that allows them to read the websites clearly (and I am assuming their job role involves them using the web) then the company has a problem. That is like a company hiring a blind person and telling that person they cannot install a screen reader. In both cases it would probably be violating the Americans for Disabilities Act (assuming this company is based in America). The employee could probably sue the company. I guess I just don''t like the idea of assuming that every disabled user is too dumb to find and configure tools that help them and therefore web developers must litter their applications and websites with controls that are a poor substitute for built-in browser support. It seems to me that all these web-based controls just clutter the website and make it less accessible. Instead of the user finding the option in their browser to increase the font size they must figure out how to use each control which works differently on every website that implements it. Also they will probably have to re-adjust that control every X number of times they visit the site. For users that are using screen readers these controls will just get in the way of them understanding the content.> In my mind, if there''s a way to provide an accessible site with minimal > extra effort (such as the 76% and em sizing solution) which is also > cross browser and contains no hacks then it''s worth the extra few minutes.Seems to me the 76% and em sizing solution is a hack. The person who developed that hack took 250 screenshots to find just the right way to achieve the results they were after. I admire the use of experimentation but I doubt it is maintainable. You think 3 years from now 76% will still be the magic number? Or will some new version of IE or Firefox change the results of that experiment? I appreciate your feedback. I have been thinking a lot about accessibility lately. Especially about trying to decide what really matters and what just seems more accessible. This conversation has helped me in that effort. Eric
> Default font sizes: Firefox 18px, IE 16pt. This amounts to about 2px of > difference in the defaults> Setting body {font-size:12px} (or any fixed size) will set both IE and > Firefox identical display sizes. To avoid diminishing the accessibility,a> user control should be provided on the page to increase or decrease the > font-size for IE.> I don''t quite get it. Why do you care about the 2px difference at all? > Your design is scalable (I assume this from the fact that you want to > use a font-resize control) and will look good in both cases.I''ll try to answer as best I can, correct a mistake I made, and mention another hack solution I came up with. The point (of not controlling default font sizes) has been argued quite a bit over the years. At my company, we''re all about designing fluid layouts. Most of my work is exactly that. The 2px difference is normally not a factor. I have a couple of instances where the 2px becomes an annoyance. One is a customer who *requires* a fixed 800x600 layout. No vertical scrolling. We design the text to fit and if the user increases the font-size because he wants larger text... well, he will get scrolling and that''s OK. We design content for this fixed layout , then test in Firefox and get a surprise vertical scroll (in normal text view). The Firefox 2px is just enough to push it over the edge. This isn''t a major problem, but it does seem like one that should be controllable. It would eliminate surprises, and unneeded revisions if the difference were not present. I may have a solution. ---------- I have a type-o above--- IE default is 12pt, which is almost exactly 16px. Interesting that IE uses pts, every other browser I''ve queried using getStyle shows px... Every other browser I tested, Opera, Netscape, default to 16px. Firefox default is 18px. The hack-fix I had in mind was to continue to use percentages, but adjust for Firefox as follows... Body {font-size: 75%} // places browsers with 16px defaults to 12px (Opera, IE, Netscape) Body {font-size: 66%} // places Firefox with 18px default to 12px It takes a couple of lines of JavaScript to set the Body Font-size accordingly, but the results are very close. The View Text-Size works well too, (in all browsers) keeping the accessibility in place.
Anderson, Eric wrote:> I understand companies have policies about installing unapproved 3rd > party software. But most sane companies should have some channel to get > software approved that is needed. If they have hired a disabled person > who has low vision problems and they are unwilling to let that user > install software that allows them to read the websites clearly (and I am > assuming their job role involves them using the web) then the company > has a problem. That is like a company hiring a blind person and telling > that person they cannot install a screen reader. In both cases it would > probably be violating the Americans for Disabilities Act (assuming this > company is based in America). The employee could probably sue the company.Good point, but that still means that the user can''t use the site, where otherwise the choice wouldn''t matter. Not to mention, my last employer had red tape so long it could be months before a request was able to be fulfilled. :(> I guess I just don''t like the idea of assuming that every disabled user > is too dumb to find and configure tools that help them and therefore web > developers must litter their applications and websites with controls > that are a poor substitute for built-in browser support.That''s not the issue, if you use px then the control is disabled in IE. And px is the only way to guarantee it will look exactly the same. They may use the control all the time in IE and run across a site they can''t change due to a design decision (using px for font sizes).> It seems to me that all these web-based controls just clutter the > website and make it less accessible. Instead of the user finding the...<snip> You make the assumption that we''re talking about separate controls modifying px values. Using the font percentage and em ratio method allows them to use the existing browser controls.> Seems to me the 76% and em sizing solution is a hack. The person who > developed that hack took 250 screenshots to find just the right way to > achieve the results they were after. I admire the use of experimentation > but I doubt it is maintainable. You think 3 years from now 76% will > still be the magic number? Or will some new version of IE or Firefox > change the results of that experiment?The em and 76% solution works as a side effect of implementing CSS font declarations. If you set a font size using a percentage and then scale the rest of the fonts (using the CSS property line-height) on the page using an em size (an em being the font size proportional to the size of an upper case M. I believe ex can be used as well) it works because the styles effect each other correctly. Unfortunately this doesn''t mean you''re wrong about the 76% and em solution being a hack. :( There is a twinkle of hackishness as values lower than 76 can cause text to become super small in some browsers. However, when it comes to forward compatibility for the "magic number" 76%, I believe there should not be a problem assuming future browsers correctly implement CSS. If you want to be safe, you could always use 90% or 80% and modify your em sizes accordingly. Actually it''s funny you should mention "3 years", as that''s just about how long ago the 76% solution was proposed. :P Cheers.
On 07/07/06, Eric Anderson <eric-ANzg6odk14w@public.gmane.org> wrote:> Seems to me the 76% and em sizing solution is a hack. The person who > developed that hack took 250 screenshots to find just the right way to > achieve the results they were after. I admire the use of experimentation > but I doubt it is maintainable. You think 3 years from now 76% will > still be the magic number? Or will some new version of IE or Firefox > change the results of that experiment?You''re right. And I for one, would love to just use 1em as the default font-size. Ideally that''s what everyone should do because the web is viewed on so many different devices these days that we should let each device render 1em the best way it can. BUT of course we all have to please someone and bosses/clients often don''t give a damn about that and only want it to look a certain way that is pleasing to them. Thus the fight for balance between being able to control presentation but making it compatible with as most software/devices possible. Thus the hunt for hacks goes on.... -- Andrew Tetlaw htp://tetlaw.id.au
A hack is nothing more than a creative solution, albeit short term and subject to breaking under the changing terms of future environments. But, then you as the creative solution engineer just find the new solution, always looking for the possibility of a more long term fix but not afraid to resort to black magic, general hackery, and other types of mysterious foo. -Ryan Gahl, 2006 :-) On 7/6/06, Andrew Tetlaw <atetlaw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 07/07/06, Eric Anderson <eric-ANzg6odk14w@public.gmane.org> wrote: > > Seems to me the 76% and em sizing solution is a hack. The person who > > developed that hack took 250 screenshots to find just the right way to > > achieve the results they were after. I admire the use of experimentation > > but I doubt it is maintainable. You think 3 years from now 76% will > > still be the magic number? Or will some new version of IE or Firefox > > change the results of that experiment? > > You''re right. And I for one, would love to just use 1em as the default > font-size. Ideally that''s what everyone should do because the web is > viewed on so many different devices these days that we should let each > device render 1em the best way it can. > > BUT of course we all have to please someone and bosses/clients often > don''t give a damn about that and only want it to look a certain way > that is pleasing to them. > > Thus the fight for balance between being able to control presentation > but making it compatible with as most software/devices possible. > > Thus the hunt for hacks goes on.... > > -- > Andrew Tetlaw > htp://tetlaw.id.au > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
-----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl Sent: Friday, July 07, 2006 9:58 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Re: Text sizing A hack is nothing more than a creative solution, albeit short term and subject to breaking under the changing terms of future environments. But, then you as the creative solution engineer just find the new solution, always looking for the possibility of a more long term fix but not afraid to resort to black magic, general hackery, and other types of mysterious foo. -Ryan Gahl, 2006 This is my hack, and I''m sticking to it... <style type="text/css"> body { font-size: 76%; } </style> <script type="text/javascript">if (navigator.userAgent.indexOf(''Firefox'') > -1) {document.body.style.fontSize = ''66%'';}</script> If anyone can shorten it a bit, thanks in advance. Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs