Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I resize text AND images?

Liquid Design

Can I resize text AND images?

by  CliveC  Posted    (Edited  )
Yes! you can.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>Smaller / L a r g e r</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<base href="http://tubularity.com/resize/" />
<style>body {background:green}
a           {text-decoration:none; color:black; background:silver}
a:hover     {color:red} 
div#text    {border: 1px solid; background:white; padding:2%}
img#monitor {width:10em}
</style><script type="text/javascript">
function ResizeDiv(val) {
rdiv = document.getElementById('text')
rdiv.style.fontSize=(parseFloat(rdiv.style.fontSize)+val)+"em"}
</script></head><body>
<a href="#" onclick="ResizeDiv(-0.2); return false">&nbsp;Smaller </a>
&nbsp;<a href="#" onclick="ResizeDiv(0.2); return false"> Larger </a>
<br /><br /><div id="text" style="font-size:1em; width:50%">
<img id="monitor" src="monitor.jpg" alt="" /><br /><br />
Yes! You can resize text and images.</div></body></html>

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top