<!DOCTYPE html> <html> <head> <style> div.outer{ width:500px; height:500px; border:1px solid black; position:relative; } div.inner{ width:50%; height:30%; border:1px solid red; position:absolute; left:25%; top:35%; } </style> </head> <body> <div class="outer"> <div class="inner"></div> </div> </body> </html>
Run
×
Share