English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

This is called the CSS Box Model.

Padding is the space inside the border between the border and the actual contents. Like padding in a jewelry box.

Margins are the spaces outside the border, between the border and the rest of the page. Like breathing room.

Keep in mind that Internet Explorer doesn't implement the box model correctly. This means that your pages will look different (and sometimes vastly different) in other browsers.

Code for Firefox, tweak for IE and Opera.

2006-08-03 19:42:56 · answer #1 · answered by AmandaKerik 5 · 2 0

Padding means like the space which we want to keep between the two consecutive structure like a cells of a table called cell padding and margin limits your layout of the css file. it defines the all four margins on top,left,bottom and right of the page got it. So padding is internal spacing and margin are boundary to the page.

2006-08-04 01:30:33 · answer #2 · answered by Samip 1 · 0 0

padding will push the object around in relation to other objects.

margin will push other objects around in relation to the object.

2006-08-04 01:13:22 · answer #3 · answered by duct_tape_is_good 4 · 0 0

fedest.com, questions and answers