Jam Pa wrote:
Hi there javascript fiends
If you had to return all 'font-size'-properties from a stylesheet, how
would you do it?
Or in more generic fashion, what kind of solution would you code for
fetching all instances of a particular property in a stylesheet?
This could be done with DOM 2 CSS methods.
I'm thinking one has to iterate through the document.style tree, and if a
property is found, its added into a result-array...
What exactly are you trying to achieve? If you want to dynamically
modify the font-size of a document, then best is to just use relative
font-size in your document and let the user use the already available
command of his browser.
W3C Quality Assurance tip for webmaster:
Care With Font Size
"Do not specify the font-size in pt, or other absolute length units.
They render inconsistently across platforms and can't be resized by the
User Agent (e.g browser).
Use relative length units such as percent or (better) em"
http://www.w3.org/QA/Tips/font-size#goodpractice
DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Firefox 1.0.4 :)