Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ช่วยดูโค๊ดแบ่งการแสดงผลออกเป็น 2 คอลัม หน่อยครับ ผมทำการแสดงผลโดยให้แสดงผลเป็น 2 คอลัม



 

ช่วยดูโค๊ดแบ่งการแสดงผลออกเป็น 2 คอลัม หน่อยครับ ผมทำการแสดงผลโดยให้แสดงผลเป็น 2 คอลัม

 



Topic : 032504

Guest




ผมทำการแสดงผลโดยให้แสดงผลเป็น 2 คอลัม ซึ่งมี code ดังนี้

Code
<div class="servicecolumnzone">

//คอลัม ซ้าย
<div class="servicecolumn1">
<div>
<h5 class="inner"> Product Name </h5>
<img src="images/theme/sm-img.jpg" alt="" class="abouticon" />
<p>xxxxxxxxxxxxx xxxxxxxx xxxxxxxxx xxxxxxxxxx xxxxxxxxxxx
xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxx xxxxxxxx xxxxxx xxxxxxx xxxxxx
xxxx xxxxxxx xxxxxxxxx xxxxxxx xxxxxxxxxx xxxxxxx xxxxxxxx xxxxxxx xxxxxx
xxxxxxxx xxxxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxx
xxxxx xxxxxx xxxxxxxx xxxxxx</p> </div>
<div class="clear"></div>
<h4>Deltail</h4>
</div>
//คอลัม ขวา
<div class="servicecolumn2">
<div>
<h5 class="inner">Product Name</h5>
<img src="images/theme/sm-img.jpg" alt="" class="abouticon" />
<p>yyyyyyy yyyyyyyy yyyyyyy yyyyyyyy yyyyyy yyyyyy yyyyyyyy yyyyyyyy yyyyyyy
yyyyy yyyy yyyyy yyyyy yyyy yyyyy
yyyyy yyyyyy yyyyy yyyy yyyy yyyy yyyy yyyyy yyyyy yyyyy yyyyyy yyyyy yyyyyy yyyyyy
yyyyy yyyyyyy yyyy yyyy yyyyyy yyyyyy yyyyyy yyyyy yyyyy yyyyy yyyyy yyyyy
yyyyyy yyyyyy yyyy yyyyyyyyy yyyyyy yyyyyyyyy yyyyyyyyyyy yyyyyyyyy </p></div>
<div class="clear"></div>
<h4>Deltail</h4>
</div>
<div class="clear"></div>

</div>


ซึ่งจะแสดงผล ดังนี้

2co

ผมต้องการแบบนี้ ต้อง แทก php และ โค๊ดการแบ่งคอลัมยังไงครับ ขอบคุณครับ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-10-02 11:45:17 By : แสน View : 1010 Reply : 5
 

 

No. 1



โพสกระทู้ ( 1,528 )
บทความ ( 1 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


PHP Multiple Rows Column






Date : 2009-10-02 11:51:56 By : Sek-Artdrinker
 


 

No. 2

Guest


ดูแล้วครับ งง เลยมาโพสถามครับ
Date : 2009-10-02 11:54:11 By : แสน
 

 

No. 3



โพสกระทู้ ( 1,439 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Facebook

Code
<style type="text/css">
h5,p{
margin:0;
padding:0;
}
.clear{
clear:both;
}
.servicecolumnzone{
margin:0;
padding:0;
width:600px;
background-color:#FFFFCC
}
.servicecolumnzone .servicecolumn1, .servicecolumn2{
margin:0;
padding:5px;
width:290px;
}
.servicecolumnzone .servicecolumn1{
float:left;
}
.servicecolumnzone .servicecolumn2{
float:right;
}
.servicecolumnzone .inner{
font-size:18px;
border-bottom:solid 1px #CC0033;
}
.servicecolumnzone img{
margin:5px 5px 2px 2px;
float:left;
}
.servicecolumnzone h4{
float:right;
}
</style>


โค้ดข้างบนจงใจใช้ css ในการตกแต่ง การตกแต่งก็ต้องใช้ css ครับ
Date : 2009-10-02 13:10:10 By : xbeginner01
 


 

No. 4



โพสกระทู้ ( 1,528 )
บทความ ( 1 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


Code (PHP)
<?
	$sql = "select * from products ";							  
	$result= mysql_query($sql) or die(mysql_error());
	$i=1;
	while($row=mysql_fetch_array($result)){
	if($i==1){
		$i=2;
?>
<div class="servicecolumnzone">
       //คอลัม ซ้าย
		<div class="servicecolumn1">
			<div>
				<h5 class="inner"> <? echo $row['ProductName'];?> </h5>
				<img src="images/theme/sm-img.jpg" alt="" class="abouticon" />
				<p> <? echo $row['ProductDetail'];?></p> 
			</div>
				<div class="clear"></div>
				<h4>Deltail</h4>
		</div>
	<? 
	}else{
	$i=1
	?>
	//คอลัม ขวา
	<div class="servicecolumn2">
			<div>
				<h5 class="inner"> <? echo $row['ProductName'];?></h5>
				<img src="images/theme/sm-img.jpg" alt="" class="abouticon" />
				<p><? echo $row['ProductDetail'];?> </p></div>
				<div class="clear">
			</div>
				<h4>Deltail</h4>
		</div>
		<div class="clear"></div>
		<?}?>
</div>
<? } ?>

น่าจะได้ละ
Date : 2009-10-02 13:42:31 By : Sek-Artdrinker
 


 

No. 5



โพสกระทู้ ( 1,439 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Facebook

oops! ผมเข้าใจคำถามผิดหรอเนี่ย นึกว่าให้ตกแต่ง :p
Date : 2009-10-02 13:52:29 By : xbeginner01
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยดูโค๊ดแบ่งการแสดงผลออกเป็น 2 คอลัม หน่อยครับ ผมทำการแสดงผลโดยให้แสดงผลเป็น 2 คอลัม
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่