SoFunction
Updated on 2025-02-28

Make web frame transparent code aligned at the bottom

Make web frames transparent
Browsers over IE5.5 and NN6 support the allowTransparency method of the Iframe object. If the background color of an object is set to Transparency, it will inherit the characteristics of the container containing it. We can achieve the on/off of transparent background through this feature.
The code is as follows:
as follows:
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</HEAD>
<BODY style="BACKGROUND-COLOR: transparent">
<H1>Transparent Document</H1>
<P>This IFRAME has no background color</P>
<P>BODY:<br><BODY STYLE="background-color:transparent"></P></BODY></HTML> 

iframe
<IFRAME ID="frame1" SRC="" allowTransparency="true" HEIGHT=180 WIDTH=300> </IFRAME>


Bottom aligned code:

<style type="text/css">
.box1 {border:1px #cccccc solid;  width:500px; height:600px;position:relative;}
.box2 {border-top:1px #cccccc solid; background:#f2f6fb; width:498px; height:22px; position:absolute; bottom:0;}
</style>
<div class="box1">
    <div class="box2"></div>
</div>