Forum Moderators: open

Message Too Old, No Replies

iframe and set text size in size

how we can set the size inside an iframe

         

lugo5

8:27 am on Sep 9, 2003 (gmt 0)



Hey,
I have an iframe and i will to change the inside text size from some text. But I don't know how.
Can somebody help me?
I have this:

<script type="text/javascript">
function smaller(a,b) {
var x= a.options[a.selectedIndex].value;
document.b.style.fontSize.value = x;
}
</script>

<select name="taille" size="3" onChange="smaller(this, iView1)";>
<option value="xx-large">Extra Grand</option>
<option value="x-large">Tr&egrave;s Grand</option>
<option value="large">Grand</option>
<option value="medium" selected>Normal</option>
<option value="small">Petit</option>
<option value="x-small">Tr&egrave;s Petit</option>
<option value="xx-small">Extra Petit</option>
</select>

<IFRAME id="iView1" style="background-color:white; width:100%; height:205px"></IFRAME>

korkus2000

5:55 pm on Sep 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe you need a container inside the iframe to style like a div or maybe even the body may work. Try adding this and see if it works:

document.b.body.style.fontSize.value = x;

MonkeeSage

9:45 am on Sep 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think this will do it...

document.b.body.style.fontSize = x + "px";

...needs the unit.

Jordan