Skip to content Skip to sidebar Skip to footer

Styling Iframes

I'm trying to display two websites on an ASP.NET MVC page. The first website should appear in the upper 130 or so pixels, and the second website should use up all remaining vertica

Solution 1:

By setting an absolute position for the content frame you are able to position it 130px from the top, which is the height of your header. Then also set it to 0 from the bottom. This produces the effect of stretching it to fill the remaining height of the viewport.

#contentdiv {
    width: 100%;
    position:absolute;
    top:130px;bottom:0;
}
#contentframe {width: 100%;height:100%;
}

here is the fiddle

http://jsfiddle.net/bAfBs/

Post a Comment for "Styling Iframes"