Posisi Div di Tengah-Tengah Halaman


Alhamdulillah, pas lagi fesbukan malah nemu script ini…

<style>

* {
margin : 0;
padding : 0;
}

.kucing {
width : 300px;
height : 400px;
background : blue;
position : absolute;
margin : auto;
top : 0;
right : 0;
bottom : 0;
left : 0;
}

</style>

<div class=”kucing”></div>

Memang, kalau rejeki nggak kemana kok (eh, ini ngomongin apa sih)

Iklan

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s