Sibkis Posted January 26, 2011 Share Posted January 26, 2011 It it possible to scale text in the same way as scaling an imageI have been messing around with the CSS but am slowly coming to the conclusion that it can not be done.CSS#img1 IMG {width:100%; max-width:33%;}HTML<p id="img1"><img src="/HTML5/images/logo.jpg" alt=""></p>Any help would be great.Thanks Link to comment Share on other sites More sharing options...
thescientist Posted January 27, 2011 Share Posted January 27, 2011 http://www.w3schools.com/css/css_font.asphttp://www.w3schools.com/css/pr_font_font-size.asptry it with relative units of measurement. Link to comment Share on other sites More sharing options...
Sibkis Posted January 27, 2011 Author Share Posted January 27, 2011 <!doctype html><html><head><title>Font Size Testing</title><meta charset="utf-8" /><script>body { font-size: 100%;} H1 {font-size: 250%;}H2 {font-size: 200%;}H3 {font-size: 150%;}H4 {font-size: 125%;}p { font-size: 100%; }H1 {font-size: 2.5em;}H2 {font-size: 2.0em;}H3 {font-size: 1.5em;}H4 {font-size: 1.25em;}p { font-size: 1.0em; }</script></head><body><h1> This Should Scale %</h1><h2> This Should Scale %</h2><h3> This Should Scale %</h3><h4> This Should Scale %</h4><p> This Should Scale %</p><h1> This Should Scale em</h1><h2> This Should Scale em</h2><h3> This Should Scale em</h3><h4> This Should Scale em</h4><p> This Should Scale em</p></body></html> This a the test page I have been using what I am looking to acheive is for the text to automaticly resize when I make my window smaller. Link to comment Share on other sites More sharing options...
ShadowMage Posted January 27, 2011 Share Posted January 27, 2011 what I am looking to acheive is for the text to automaticly resize when I make my window smaller.I don't think that's possible with just CSS. You might be able to do something with JavaScript, where you capture the resize event and change the font size of the body. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.