HTML CSS examples for CSS Layout:Relative Position
Div inside another Div positioned relatively and overflow
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .out {<!--from w w w . j ava2 s. c o m--> margin-left:100px; width:131px; height:131px; margin-top:11px; border:2px solid Chartreuse; position:relative; overflow:hidden; } .in { width:100%; height:100%; z-index:1000; clear:both; position:absolute; background-color:yellow; } </style> </head> <body> <div class="out"> <div class="in"> </div> </div> </body> </html>