Postingan lainnya
Kelas Premium!
Belajar bikin website dari nol sekarang
Gunakan kupon "lebihcepat" untuk diskon 25%!
card column kaya tampilan sekolah coding
Selamat siang, Mau tanya gimana caranya supaya tampilan barisan card nya kaya di sekolah coding, kalo yang saya buat malah baris ke bawah.
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4">
<div class="image-flip">
<div class="card">
<div class="card-body text-center">
<h4 class="card-title"><?=$data['oc_id'] ?></h4>
<p class="card-text"><?=$data['oc_name'] ?>.</p>
</div>
<button class="btn btn-info" onclick="window.location.href='detail_laporan_perjalanan'">
<i class="fa fa-file-text-o" aria-hidden="true"></i> Laporan
</button>
</div>
</div>
</div>
</div>
</div>
card_.PNG
2 Jawaban:
<div>coba kalo kaya gini gmna ? </div><pre><div class="container"> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-4"> <div class="image-flip"> <div class="card"> <div class="card-body text-center"> <h4 class="card-title"><?=$data['oc_id'] ?></h4> <p class="card-text"><?=$data['oc_name'] ?>.</p> </div> <button class="btn btn-info" onclick="window.location.href='detail_laporan_perjalanan'"> <i class="fa fa-file-text-o" aria-hidden="true"></i> Laporan </button> </div> </div> </div> <div class="col-xs-12 col-sm-6 col-md-4"> <div class="image-flip"> <div class="card"> <div class="card-body text-center"> <h4 class="card-title"><?=$data['oc_id'] ?></h4> <p class="card-text"><?=$data['oc_name'] ?>.</p> </div> <button class="btn btn-info" onclick="window.location.href='detail_laporan_perjalanan'"> <i class="fa fa-file-text-o" aria-hidden="true"></i> Laporan </button> </div> </div> </div> <div class="col-xs-12 col-sm-6 col-md-4"> <div class="image-flip"> <div class="card"> <div class="card-body text-center"> <h4 class="card-title"><?=$data['oc_id'] ?></h4> <p class="card-text"><?=$data['oc_name'] ?>.</p> </div> <button class="btn btn-info" onclick="window.location.href='detail_laporan_perjalanan'"> <i class="fa fa-file-text-o" aria-hidden="true"></i> Laporan </button> </div> </div> </div> </div> </div></pre>
Tanggapan
kalo gitu hasil nya, 3 baris data nya sama gan.
iya tinggal di looping aja pake while,
<pre><?php while($data = mssql_fetch_array($result)){ ?> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-4"> <div class="image-flip"> <div class="card"> <div class="card-body text-center"> <h4 class="card-title"><?=$data['oc_id'] ?></h4> <p class="card-text"><?=$data['oc_name'] ?>.</p> </div> <button class="btn btn-info" onclick="window.location.href='detail_laporan_perjalanan'"> <i class="fa fa-file-text-o" aria-hidden="true"></i> Laporan </button> </div> </div> </div> <div class="col-xs-12 col-sm-6 col-md-4"> <div class="image-flip"> <div class="card"> <div class="card-body text-center"> <h4 class="card-title"><?=$data['oc_id'] ?></h4> <p class="card-text"><?=$data['oc_name'] ?>.</p> </div> <button class="btn btn-info" onclick="window.location.href='detail_laporan_perjalanan'"> <i class="fa fa-file-text-o" aria-hidden="true"></i> Laporan </button> </div> </div> </div>
</div> </div>
<?php } ?></pre>