scalable font size?
Hi, I stumbled on a problem, I am playing with responsive design, all my div, h and p elements are in percentage, so they all resize properly. but how do I do the same with font size? I read that em and percentage are good for resizing, but I tried it and it doesn't do a thing, what did I do wrong?
Hard to tell without seeing your code. Are you setting percentages for the elements the text is in (including the body) as well as the 'em' sizes for the font?
Thanks for the reply.There is no need to see my code, I just need to know in general how to make the font size re sizable base on how visitors resize their browser windows.
let's say a div Width is 80% and Height is 20%, the div resizes as expected but the text within is unaffected whether I use font-size 100% or 1em.
Not possible without scripting
From the top of my head:
There is another thread on this forum you can read http://www.webdeveloper.com/forum/sh...-size-changes.
You can use JQuery to do the trick you wanted:
Another JQuery, possibly not really related to your question, but a good implementation.
A zoom button solution for you
The basic of font sizing for a page
Might be of some help:
Convert em,px,pt and % in CSS: http://www.getallfix.com/2011/11/con...pt-and-in-css/
FitText.js plugin (FitText is a jQuery plugin that makes your font-sizes flexible, allowing headlines to automatically-expand to fit the available space): http://fittextjs.com/
Adapt.js - Adaptive CSS: http://adapt.960.gs/
Beginnerís Guide to Responsive Web Design: http://thinkvitamin.com/design/begin...ve-web-design/
What The Heck Is Responsive Web Design? (A super-impressive CSS3 presentation built on impress.js, demonstrating the basics of Responsive Web Design): http://johnpolacek.github.com/WhatTh...ressjs/#/title
Creating Responsive HTML5 Touch Interfaces: http://www.youtube.com/watch?v=lcD9CF0bxyk
Responsive Images: How they Almost Worked and What We Need: http://www.alistapart.com/articles/r...-what-we-need/
Responsive Tables: http://www.zurb.com/playground/responsive-tables
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)