Jump to content

Scaling text


Sibkis

Recommended Posts

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

<!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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...