What is the difference between Padding and Margin? - ProProfs Discuss
Advertisement

What is the difference between Padding and Margin?

What is the difference between Padding and Margin?

Change Image    Delete

Asked by Deborah , Last updated: Nov 19, 2024

+ Answer
Request
Question menu
Vote up Vote down

2 Answers

C. Perez

C. Perez

Just getting better day by day

C. Perez
C. Perez, Writer, Writer, Cleveland

Answered Oct 15, 2020

In CSS (Cascading Style Sheets), padding is the room maintained between the content and the border, and it splits the content of a block from its edge. The padding is crystal clear and includes the background image or background color of the features as well. The quantity of padding of an element is specified by using the term padding in CSS code.

If necessary, different padding values can be independently specified for left, right, top, and bottom. The proceeding piece of code specifies different padding values for each side. In CSS, the margin is the space outside the border, and it detaches a block from other blocks. The margin is also visible; however, the margin does not incorporate background illustrations or background colors employed to the element.

The extent of margin in CSS is specified utilizing the term margin. Padding is the space outside the border and the content, while the margin is outside the border line. The margin disconnects one block from the other. Margins of contiguous blocks can overlap, and the distance between the elements is double the amount. Padding separates control from its content.

upvote downvote
Reply 

N. Kingsley

N. Kingsley

N. Kingsley
N. Kingsley, Writer, Columbus

Answered Sep 16, 2020

People who are involved in designing will be familiar with the term margin and padding. Margin and padding refer to space between elements.

Padding is the term used to refer to space between elements and borders, while margin is the term used to describe the space between elements and external elements. In their interaction, padding interacts with the internal constituents of the design or object; margin interacts with the external environments of the subject under attention.

Margin ensures that the object is not exposed to other objects surrounding the object four sides, while padding plays the roles of ensuring that the content of objects does not interact with the border. Margin increases the size of an object by increasing it on the height and breadth; padding does not affect the height and breadth.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.