<div style="width:800px; height:100%; position:relative;" class="b">
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
<div style="float:left;" class="a">Content for New Div Tag Goes Here</div>
</div>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.a{
float:left;
width:100%;
border-bottom:1px #999 solid;
padding:5px;
}
.b {
width:800px;
margin:0 auto;
position:relative;
overflow:hidden;
border-left: 1px #999 solid;
border-top: 1px #999 solid;
border-right:1px #999 solid;
font-family:tahoma;
font-size:12px;
}
</style>
</head>
<body>
<div class="b">
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
<div class="a">Content for New Div Tag Goes Here</div>
</div>
</body>
</html>
แต่ถามเพิ่มเติมนะครับ อยากให้ div ที่มีข้อความ a และ b สูงตามข้อความ Content for New (ส่วนนี้เป็น คอมเม้น ยูสเซอร์)......... ยังไงครับ
Code
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.a{
float:left;
width:255px;
border-bottom:1px #999 solid;
border-right:1px solid;
padding:5px;
}
.b {
width:800px;
margin:0 auto;
position:relative;
overflow:hidden;
border-left: 1px #999 solid;
border-top: 1px #999 solid;
font-family:tahoma;
font-size:12px;
}
</style>
</head>
<body>
<div class="b">
<div class="a">aaaaa aaaaaaa aaaaa aaa aaaa</div>
<div class="a">bbbbbbbbb bbbbbbbbbbb bbbbbbbbb bbbbbbb bb bbbbbbb b b b b bbbbb bbb bbb bbb</div>
<div class="a">Content for New Div Tag Goes HereContent for New Div Tag Goes HereContent for New Div Tag Goes HereContent for New Div Tag Goes HereContent for New Div Tag Goes Here
Content for New Div Tag Goes HereContent for New Div Tag Goes Here
Content for New Div Tag Goes HereContent for New Div Tag Goes Here
Content for New Div Tag Goes HereContent for New Div Tag Goes Here
Content for New Div Tag Goes HereContent for New Div Tag Goes Here
Content for New Div Tag Goes HereContent for New Div Tag Goes HereContent for New Div Tag Goes Here
Content for New Div Tag Goes Here</div>
</div>
</body>
</html>