Search code examples
cssiframeframeframeset

Show two frames while one overlaps another


I'm trying to show a small frame on the bottom right corner, like in the below picture:

https://i.sstatic.net/dSHT1.jpg

I'm currently using frameset, but I can switch to iframe if needed.

I know frames are bad, but the entire site is laid out like that.

How to make them overlap instead of them appearing side by side?


Solution

  • <iframe id="frame1"></iframe>
    <iframe id="frame2"></iframe>
    <iframe id="frame3"></iframe>
    
    #frame1{
        position: static;
    }
    
    #frame2{
        position: absolute;
        top: 100px;
        left: 100px;
        z-index: 1;
    }
    
    #frame3{
        position: static;
    }
    

    Modify the top and left to your needs.