Position controls & div within a div

<div runat=“server” style=“border: thin solid black; position: absolute; z-index: 115; left: 69px; width: 178px;
top: 150px; float:right; height: 66px; display:none;”
<div runat=“server” style=“float:right;”>
<asp:Button runat=“server” ID=“btnok” Text=“X” OnClientClick=“A()”/></div> 
<div2 runat=“server”> <textcontrol1></div>


i have above
i want the div2 to be visible in div1 with border of div1 appearing
currently i on the page div2 with control is visible & even button is visible but it appears as hanging with no border for div1
i also had given background for div1 but it appears transparent

i need as attachent shown

I would layout the site as it needs to look before I put in the Asp.Net server controls in there. Either way the div tag does not need a runat = “server” attribute, unless you need it in the code behind.

About your HTML, Is there a reason you are using absolute positioning?
Not sure why you have floated the div right or used display none on the outer div. Also there is no div2 control. You might want to have its id set as div2.

This is what I have. The experts here might have better code for you.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <style type="text/css">
        	border:solid gray 2px;
        	margin:150px 0px 0px 69px;
        	width: 300px;
        	height: 300px;

        	border:solid black 2px;
        	margin:150px 0px 0px 69px;
        	width: 200px;
        	height: 200px;


    <div id="div1"><input type="submit" class="submit" value="OK" />
        <div id="div2" ><input type="text"  /></div>