How <div> does?

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

When we create a new aspx in VS.Net, it will insert <div> tag inside <form>
tag, like below.
What is the function of <div> do?
----------------------------------------------------------------------------
------------------------------------------
<form id="form1" runat="server">
<div>

</div>
</form>
 
ad said:
When we create a new aspx in VS.Net, it will insert <div> tag inside
tag, like below.
What is the function of <div> do?
----------------------------------------------------------------------------
------------------------------------------
<form id="form1" runat="server">
<div>

</div>
</form>

what if you had a table, a couple of labels, and a few buttons that you
wanted to be rendered as a group, with a background color of beige and
you want to track the mouse as it moves within the group? To do that
you would code all those elements within a div, set the background
color style of the div and you would set the onmousedown property of
the div to a javascript function.

<div id="Div2" style="position:absolute; top:80px; left:45px;
z-index:10001;background-color:beige;font-size:14;"
onmousedown="Div2MouseDown( this );"
onmousemove="Div2MouseMove( this );"
onmouseover="this.style.backgroundColor='red';
javascript:OverCx+=0; Div2MouseOver( this );"
onmouseout="javascript:Div2CursorOver=false;
this.style.backgroundColor='beige';" >
<SPAN STYLE="color: blue;text-decoration:underline;
font:italic normal bolder 12pt Arial;">Enter customer
name:</SPAN>
<br />
<INPUT TYPE=text VALUE="initial value" NAME="textbox2" SIZE=15 />
</div>

-Steve
 
Back
Top