kenapa footernya gini ya gan ?

gimana supaya footernya menempel terus di bawah ?

ini code ane gan

#copyright{
		margin-bottom: 0px;
    width: 100%;
    position: absolute;
    height:50px;
    line-height:50px;
    background:#3c3a3a;
    color:#fff;
    padding-left: 10px;
  }

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Diperbarui 7 tahun yang lalu

20 Jawaban:

#footer {
   position:absolute;
   bottom:0;
   width:100%;
   height:60px;   /* tinggi dari footer */
   background:#6cf;
}

coba style ini ..

avatar jhonyrain32
@jhonyrain32

196 Kontribusi 192 Poin

Dipost 7 tahun yang lalu

saya pikir itu karna position nya absolute gan...

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

seharusnya apa gan kalo gak absolute soalnya itu dah ane coba pake fixed ntar malah ngikut terus pas di scroll

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Dipost 7 tahun yang lalu

Coba tanpa position..

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

sama aja gan

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Dipost 7 tahun yang lalu

Aku mau lihat semua kodenya gan..

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

<?php
require_once "init.php";
require_once "view/header.php";

$articles = tampilkan();
if(isset($_GET['cari'])){
  $cari     = $_GET['cari'];
  $articles = hasil_cari($cari);

}
 ?>
<form action="" method="get" class="pencarian">
   <input type="search" name="cari" placeholder="Cari Disini gan!...">
</form>

<div class="pagination">
  <?php for($i=1; $i<=$pages; $i++){ ?>
    <a href="?halaman=<? echo $i ?>"> <? echo $i ?> </a>
  <?php } ?>
</div>

 <?php
 $blog = mysqli_query($link, "SELECT * FROM blog");
 while($row= mysqli_fetch_assoc($articles)):
   ?>

   <div class="table-row-equal" >
           <div class="col-md-6 col-md-4">
           <div class="thumbnail">

        <img class="img-responsive" src="upload/<?php echo $row['gambar']; ?>">

            <div class="caption">
           <h3><?= $row['judul']; ?></h3>
           <p>
             <?= excerpt($row['isi']); ?>
           </p>
          <div id="menu_thumb">
           <p class="waktu"> <?= $row['waktu']; ?> </p>
           <p class="tag"> Tag: <?= $row['tag']; ?> </p>
           <a href="edit.php?id=<?= $row['id']; ?>" class="btn btn-primary"> Edit </a>
           <a href="delete.php?id=<?= $row['id']; ?>" class="btn btn-danger"> Hapus </a>
           <a href="single.php?id=<?= $row['id']; ?>" class="btn btn-info"> Baca Selengkapnya </a>
         </div>
       </div>
       </div>
     </div>
   </div><!--akhir thumbnail row-->
<?php endwhile; ?>

<br><br>

 <?php
 require_once "view/footer.php"
 ?>

<link rel="stylesheet" href="view/style.css">

<footer>
  <div id="copyright">Copyright © JarKom 2017 . All right reserved.<span id="withlove"> [ ] with
    <span style="color:pink"></span> in Klaten - Indonesia</span> </div>
</footer>

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Dipost 7 tahun yang lalu

ccscscscscscscsc

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

Contohh yang pake position..

<!DOCTYPE html>
<html>
<head>
<style>
div.relative {
    position: relative;
    width: 400px;
    height: 200px;
    border: 3px solid #73AD21;
}

div.absolute {
    position: absolute;
    top: 80px;
    right: 0;
    width: 200px;
    height: 100px;
    border: 3px solid #73AD21;
}
</style>
</head>
<body>

<h2>position: absolute;</h2>

<p>An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed):</p>

<div class="relative">This div element has position: relative;</div>
<div class="absolute">This div element has position: absolute;</div>
</body>
</html>

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

Contoh yang gk pake position gann.. Mungkin bisa membantu


<!DOCTYPE html>
<html>
<head>
<style>
div.relative {
    width: 400px;
    height: 200px;
    border: 3px solid #73AD21;
}

div.absolute {
    right: 0;
    width: 200px;
    height: 100px;
    border: 3px solid #73AD21;
}
</style>
</head>
<body>

<h2>position: absolute;</h2>

<p>An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed):</p>

<div class="relative">This div element has position: relative;</div>
<div class="absolute">This div element has position: absolute;</div>
</body>
</html>

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

Gini udah di coba ?

#copyright{
    margin-bottom: 0px;
    width: 100%;
    background:#3c3a3a;
    color:#fff;
    padding-left: 10px;
  }

#footer {
   width:100%;
   height:60px;   /* tinggi dari footer */ Ini kok dibuat seperti ini gan ?
   background:#6cf;
}

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

fungsi div.absolute buat apa ya gan

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Dipost 7 tahun yang lalu

Untuk style footer nya gan.. ada dua contoh yang pake position absolute dan relative juga yang tanpa kedua nya.. coba dipelajari gan

avatar dodipsitorus
@dodipsitorus

412 Kontribusi 145 Poin

Dipost 7 tahun yang lalu

oke gan :)

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Dipost 7 tahun yang lalu

gimana gan? berhasill??

avatar jhonyrain32
@jhonyrain32

196 Kontribusi 192 Poin

Dipost 7 tahun yang lalu

coba ini gan.

bottom: 0

dan

position: fixed
#copyright {
 bottom: 0;
 position: fixed;
}

avatar fathy
@fathy

21 Kontribusi 10 Poin

Dipost 7 tahun yang lalu

ttp gak bisa gan :(

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Dipost 7 tahun yang lalu

coba agan lihat di sini [link]http://stackoverflow.com/questions/13788357/css-for-fixed-footer[/link]

lihat juga preview yg ane buat di [link]http://codepen.io/orangtanah/pen/RKmENx[/link]

avatar fathy
@fathy

21 Kontribusi 10 Poin

Dipost 7 tahun yang lalu

bisa gan tapi kalo pake fixed kalo di scroll footernya ngikut gan, cara ngatasinnya gimana gan?? :)

avatar Dagimal
@Dagimal

275 Kontribusi 24 Poin

Dipost 7 tahun yang lalu

coba di cssnya dibuat seperti ini gan

footer {
	width: 100%;
	height: 40px;
	margin-top: 871px;
	position: fixed;
}
avatar mhdadil
@mhdadil

105 Kontribusi 61 Poin

Dipost 7 tahun yang lalu

Login untuk ikut Jawaban