CSS challenge
- Started
- Last post
- 15 Responses
- heavyt
I have been working on a large site which is uses CSS for some text, and not for others.
i need to find a way for the user to adjust the font size.
anybody got an idea??
TR1
- idsgn0
you need to change the size of both the CSS and non-CSS text?
- heavyt0
yes, i am considering making all of the text CSS. i think that ti is inevitable.
TR1
- idsgn0
if all the text was css it would be simple to change it with some Javascript
- SF0
Make all the text CSS. If only for consistency.
- unformatted0
you can do it with javascript OR if you set all font-sizes to a percentage, the user will be able change the text size with their browser.
- sparker0
what?
what else do you do text with in xhtml? font tags have been deprecated since html 4.01.
and as for switching font sizes, this is accomplished many ways...not involving non cross-browser javascript solutions.
first off, in any modern browser, the font size can be adjusted via the browser controls anyway. if you are really worried about sizes, build it using ems/pts instead of pixels.
if you are talking about building a script to change font size, then check this out:
http://alistapart.com/articles/p…
- heavyt0
my thought was that if all text was pulling from a common CSS file, it is easy to make changes across the site, and also to be able to use a javascript to change all text.
i know that modern browsers are able to text zoom on css, but IE doesnt.
i figure that if the javscript doesnt work for non-IE browsers, there is always the option to use text zoom. anybody using old browsers that are non-compliant will just have to deal with the default size.
TR1
- gabriel_pc0
You can change your font sizes with IE as long as the fonts are not set to pixel heights. I've found it's best to leave the text resizing up to the browser application instead of using javascript.
- jevad0
http://www.jevad.com/sallmanns/
use the A+ and A- buttons at the bottom - still debugging mind - but seems to work well - also creates a cookie that carries your font size selection page to page....
- vsc0
questions like this makes me value the History class (click bottom left):
- jox0
Oh no you didn't!! Jevad, you are a little icon thief aren'tcha? :P
"Herald Tribune". Does that ring a bell? :D
- jevad0
heh - yeah yeah I know - don't worry I'm not that blatant! It's purely for testing purposes and till I can find the time to do mine own...
^_^
- jox0
haha, I'm SO kidding man, I've done that too with those exact same icons. That's how I recognized them. :)
Never used it for a project though. Every time i use something that isn't 100% mine it turns out either ugly or stupid. Hmm.
- Bunkum0
I think the RCA site allows you to adjust text size: http://www.rca.ac.uk/
- jevad0
that rca one is great