HTML CSS examples for CSS Layout:Fixed Position
use "position:fixed" for fixing an img to a pop-up div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .popup {<!-- w w w . jav a2 s.com--> position:fixed; background-color:Chartreuse; left:51px; right:51px; bottom:51px; top:51px; } .popup-content-wrap { height:100%; width:100%; overflow:auto; } .popup-content { height:1001px; } .close { position:absolute; bottom:21px; right:21px; } body { height:1001px; background:red; } </style> </head> <body> <div class="popup"> <div class="popup-content-wrap"> <div class="popup-content"></div> </div> <div class="close"> Lorem i </div> </div> </body> </html>