Apa Itu Border, Padding, Dan Margin Pada CSS?

Widgets

PopAds.net - The Best Popunder Adnetwork
 
Sebelum kita memulai mengatur letak halaman kita, perlu kiranya diperhatikan posisi padding maupun margin dari tiap halaman blog kita, semakin rapi letaknya, maka akan semakin menarik blog kita... Untuk lebih jelas tentang apa itu border, padding maupun margin, kamu dapat melihat ilustrasi berikut..




Dari ilustrasi di atas, dapat terlihat bagian-bagian yang ada pada masing-masing halaman blog kamu..
  • Content dapat berupa bagian isi dari halaman kamu;
  • Padding merupakan jarak yang memisahkan bagian isi dengan border atau bagian isi tanpa border dengan margin-nya.
  • Border merupakan garis pinggir yang sering digunakan untuk membingkai bagian isi tersebut;
  • Margin merupakan bagian terluar atau yang memisahkan padding dengan halaman.
Ada beberapa satuan yang sering saya gunakan digunakan pada CSS seperti :
  • pt : point (1 pt = 1/72 inch)

  • px : pixel (merupakan ukuran terkecil pada monitor)

  • % : persen (dalam bentuk persentase)

  • em : atau ems (merupakan ukuran font pada elemen)


Ada juga sih satuan lain seperti in (inchi), cm, mm, pc, ex, tapi ukuran tersebut jarang saya gunakan sebab semakin banyak satuan ukuran yang digunakan akan semakin pusing kita mengatur halaman kita... hehehe..

Dalam mengatur/meng-edit padding, border, dan margin-nya, kita dapat menggunakan satuannya tersebut seperti berikut ni contohnya....

padding: 5px 0px 5px 0px;

Pada pengaturan di atas, urutan angkanya dimulai dari atas, kanan, bawah dan kiri. Atau jika pusing dalam menggunakannya, kamu cukup menggunakan padding-(top/right/left/bottom)..
contohnya,,

padding-top: 5px (ini berarti jarak antara bagian isi dengan marginnya sebesar 5 pixel)..

Aturan di atas dapat juga kamu gunakan pada border ataupun margin, namun khusus pada bagian border, aturan seperti itu jarang saya gunakan sebab pasti lucu kalo bingkainya besar kecil sebelah.. hwahwa ...

Untuk bagian border, biasanya digunakan aturan seperti ini contohnya...

border: 2px solid #362df4;
Artinya kayak gini nich : "hai border, aku pengen kamu berukuran 2 pixel, bentuknya solid/ga putus-putus dan warnanya biru(#362df4)...
hasilnya jadi seperti ini...


Isi content kamu


Selain bentuk solid, kamu juga bisa menggunakan kata dotted, dashed, groove, ridge, inset, outset, dll... (jadi inget waktu bikin friendster nich...!!! )

Pengen tau bentuk lainnya seperti apa?? praktekin langsung dunkz biar ngerti n paham.... Selamat berkreasi ya....



lazadda

36 comments: Post Yours!Read Comment Policy ▼

  1. Wah thanks gan info nya :)

    ReplyDelete
  2. wah mantap banget :D

    ReplyDelete
  3. sedang memperdalam ilmu soal script.... nice postingan

    ReplyDelete
  4. Anonymous3:35 AM

    Thanks mastah :D

    ReplyDelete
  5. agak bingung,, tapi saya mau coba.

    ReplyDelete
  6. kadang suka bingung antara padding sama margin waktu nulis kode css.

    ReplyDelete
  7. aduh ... mau buat menu dan sub menu gan?

    butuh pencerahan nieh

    ReplyDelete
  8. Anonymous9:57 PM

    Makasi gan.. nambah ilmu nih..

    ReplyDelete
  9. 1Mutahhar3:03 PM

    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    653

    ReplyDelete
  10. Muriell10:49 PM

    Hotlink has been deleted.
    Hotlink has been deleted.
    XOOTGA

    ReplyDelete
  11. InfinityBender426:53 PM

    Hotlink has been deleted.
    Hotlink has been deleted.
    LQWNİF

    ReplyDelete
  12. Hotlink has been deleted.
    Hotlink has been deleted.
    UKO

    ReplyDelete
  13. CosmicNomadXY122:19 AM

    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    ADN1PQ

    ReplyDelete
  14. CelestialVoyageress7:37 AM

    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    OCPMT

    ReplyDelete
  15. CelestialVoyageress10:16 AM

    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    T6T

    ReplyDelete
  16. SolarBardA8810:57 PM

    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    BG8

    ReplyDelete
  17. 705CAJayvionA70B23:56 AM

    7A829
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  18. EFD99Brittany5271F6:41 AM

    DE0FB
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  19. 179D3Bruce7346D8:39 AM

    D920D
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  20. 342F2Wayne907358:42 AM

    FB82A
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  21. 2BEE9AlexiaF3E0712:34 PM

    3F9FF
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  22. 9C2FCKolten991CA7:37 AM

    DFF43
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  23. 5A231Marvin014E07:52 PM

    902A0
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  24. 34E01JayvionE9B5910:42 AM

    177A6
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  25. E7EC5Makayla7F15511:01 PM

    2BD5D
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  26. 429D0MakaiC59FC4:23 PM

    1577E
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  27. 78D02Rex385E76:39 AM

    68C52
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.
    Hotlink has been deleted.

    ReplyDelete
  28. Anonymous10:10 PM

    Hotlink has been deleted. RkGHfLoGyK

    ReplyDelete
  29. Anonymous7:56 PM

    Hotlink has been deleted. Be6YxVDjOS

    ReplyDelete
  30. Anonymous7:13 PM

    QzZMgZTX3w

    ReplyDelete
  31. Anonymous6:54 PM

    Hotlink has been deleted. OvCqDPflmu

    ReplyDelete
  32. Anonymous3:32 PM

    Hotlink has been deleted. m5wr8atDWB

    ReplyDelete
  33. Anonymous6:31 PM

    Hotlink has been deleted. 8tBHov0z5F

    ReplyDelete
  34. Anonymous2:46 PM

    3A95284D7E
    Hotlink has been deleted.

    ReplyDelete
  35. Anonymous6:20 PM

    Hotlink has been deleted. N0vOtnawtD

    ReplyDelete
  36. Anonymous7:48 PM

    Hotlink has been deleted. MjMsL0q8g4

    ReplyDelete

Tukeran link


Vinspirations



DMCA.com
 

Info Blog

Recent Comments

Label

Copyright 2009  ©  Vinspirations | powered by Blogger

Template by vinspirations | Best View on Firefox