Peter wrote:
how can I do to make a css file to change automatically the text size of the
text that is into a table relatively the screen size?
I.E. if the screen is 800 x I want the text size=10pt but if it is 1024 I
want the text size =12 pt.
I don't know where to start.
1) *You* may want the font that size, but what about the user of your
site? He or she may use a larger screen to fit more information on, and
you are undoing their wishes.
pt is a particularly illogical choice for screen display, as it is a
physical measurement (72pt = 1 inch). What does that mean for your fonts
on a 3" PDA screen or a 90" projection screen? How do you even know the
physical size of the viewing area?
Don't set absolute font sizes, but use relative sizing with 100% as the
main content text size. That way, the user gets the font size (s)he wants.
2) Screen width is not the same as browser window width. The user may
want to use a large screen to have multiple windows side by side.
3) Don't use tables for layout.
Having said all of that, there is a great article on a method to adapt
layout to browser window width using Javascript DOM manipulation. This
isn't guaranteed to work all the time on all browsers, but is a nice
enhancement:
http://www.themaninblue.com/writing/...ve/2004/09/21/
I use this on my latest site project:
http://step-by-step.org.uk/
If you reduce the window width below about 700px, the header layout
changes, the menu bar shrinks and the text in the table on the
"Prospectus " page shrinks.
Use with care and thought. Modifying font sizes can cause real
accessibility issues.
--
Mark.
http://tranchant.plus.com/