How <div> does?

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>
 
S

Steve Richter

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top