Hi
So many time, we will get the alignment problem of div. Here is the complete css code for Div alignment.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Div.aspx.cs" Inherits="CSS_Test_Div" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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">
<head>
<title>Aligning Multiple DIV's using CSS</title>
<style type="text/css">
.divOuter {
display:inline;
text-align:center;
}.divInner1, .divInner2, .divInner3
{
border: 1px solid;
float:left;
width:150px;
height:150px;
margin-left:3px;
margin-right:3px;
}
</style>
</head>
<body>
<div class='divOuter'>
<div class='divInner1'>First DIV</div>
<div class='divInner2'>Second DIV</div>
<div class='divInner3'>Third DIV</div>
</div>
</body>
</html>