Creating an Iframe in CSS

August 17, 2006 {2 years, 2 months ago.} (posted by Anish Blon)

Creating Iframe with help of CSS is an easy task. We will take help of CSS selector.

<style type="text/css">
.iframe_class{
    height:150px;
    width:300px;
    overflow:auto;
    color:#fff;
    background:#369;
    border:1px solid #33a;
    padding: 3px;
}
</style>

Somewhere in body, we can use above created iframe_class selector in following way.

<span class="iframe_class">Some Text Goes Here.. Dummy Text.</span>

Download Example:
Example of Creating Iframe in CSS


Recommended Reading


Post a comment or question



  1. (required)(required)

  2. (required)(required)(will not be published)


Search on site