Dear Sir,
How to create div inside div like attached file.
That is simply a nested div with the inner one positioned and with a red border.
<div style="width:200px; height:100px; background-color:green; color:white:">This is Div1
<div style="border:medium solid red; background-color:yellow; color:black; width:120px; height:50px; position:absolute; top:45px; left:55px">This is Div2</div></div>
Obviously, widths, heights, colors, and positions are estimates.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.