Q:

How to set height/width in iframe using class?

Why doesn't the following iframe adhere to these class rules?
<script type='text/css'> 
.videodimensions{height:480;width:240};
</script>

<iframe class="videodimensions" src="" frameborder="1" allowfullscreen showinfo="0"></iframe>

http://jsfiddle.net/v8zDr/1/

A:

Try adding some units to the css definition
.videodimensions{height:480px; width:240px}

also the semicolon at the end is unecesary. and as previously mentioned by someone your css is in the wrong box on the fiddle

A:

http://jsfiddle.net/v8zDr/5/
.videodimensions{height:480px;width:240px;}

paste the css to the css box and add 'px' after your width - height numbers

