Skip to content

Challenge Add Different Padding To Each Side Of An Element

Quincy Larson edited this page Aug 20, 2016 · 1 revision

Challenge Add Different Padding to Each Side of an Element

CSS allows you to control the padding of an element on all four sides with padding-top, padding-right, padding-bottom, and padding-left attributes.

.green-box {
  background-color: green;
  padding-top: 40px;
  padding-right: 20px;
  padding-bottom: 20px;
  padding-left: 40px;
}
Clone this wiki locally