How do you set margin on each side of a div element to different value?

Experience Level: Junior
Tags: CSS

Answer

Example

dive  {
    margin: 4px 5px 9px 3px;
}
Related CSS job interview questions
CSS for beginners
CSS for beginners

Are you learning CSS? Try our test we designed to help you progress faster.

Test yourself