• Iklan text, 150 Karakter Free hingga akhir tahun
  • Iklan text, 150 Karakter Free hingga akhir tahun

TUTORIAL : Introduction Padding, Margin, and Border in CSS

Posted by at
For those of you who like brain-tweaking the blog template (not just in the blog template seeh), would often see the words and terms Padding, Margin and Border in CSS are used as a basis of measurement in CSS. Well at this meeting I will give a little understanding of the third thing and also useless.

Padding, Margin, and Border, before I explain further please see the schematic picture below first:

Well from the description above we can conclude as follows

Padding : Determine the distance to the border or body components inside the distance measure
Border : Is the margins of the component
Margin : The size of the outer gap or distance measure after Border




How to Use It

Padding
written with CSS padding:5px 5px 5px 5px; sequence numbers values ​​are top, right, bottom and left, or you can use
padding-left:5px; This is for setting padding left
padding-right:5px; This is for setting the right padding
padding-top:5px; for the top and
padding-bottom:5px; to the bottom, remember unit px (pixels) you can change according to another appropriate unit

Border
Written by CSS border:1px dotted #000000; the order of its use is the size of the border, border style and border color, or can use
border-width:1px; This is the thickness of the border
border-style:dotted; This is the kind bordernya you can change with dashed, solid, double, groove, ridge, inset, outset and others
border-color:#FFFFFF; This is the color of the border .. You can change the color code (www.colorschemer.com/online)

Margin
Written by CSS margin:5px 5px 5px 5px; order of top, right, bottom and left, or could use as padding above
margin-left:5px;
margin-right:5px;
margin-top:5px;
margin-bottom:5px;
other information can follow the description above padding

Unit in CSS

1. Static
  • in -- units of inches
  • cm -- units of centimeter
  • mm -- units of milimeter
  • pt -- units of point (1 point = 1/72 inchi)
  • pc -- units of pica (1 pica = 12 point)
  • px -- units of pixel (least one point in the monitor screen image)
2. Relative
  • % -- units of persen
  • em -- or ems (1em = font size in the middle of the element)
  • ex -- 1ex = x-height of a font (x-height is usually half the size of the font)
A few tutorials. hopefully useful for you

Tidak ada komentar untuk " TUTORIAL : Introduction Padding, Margin, and Border in CSS "

Prohibited from using harsh words and the words of the SARA, the words that indicate the Flame against someone that I would quarrel delete and block from this blogspot!!
--------------------------------------------
Dilarang menggunakan kata-kata kasar dan kata-kata yang mengandung SARA, kata-kata yang mengindikasikan Flame terhadap seseorang sehingga terjadi pertengkaran akan saya hapus dan blok dari blogspot ini !!

Back to Top