[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/CSS/Reference/Properties/padding-left [Back]  [Original]

padding-left - CSS: Cascading Style Sheets | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

padding-left

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

padding-left CSS .

In this article

padding-left: 1.5em;
padding-left: 10%;
padding-left: 20px;
padding-left: 1ch;
padding-left: 0;
<section id="default-example">
  <div class="transition-all" id="example-element">
    <div class="box">
      Far out in the uncharted backwaters of the unfashionable end of the
      western spiral arm of the Galaxy lies a small unregarded yellow sun.
    </div>
  </div>
</section>
#example-element {
  border: 10px solid #ffc129;
  overflow: hidden;
  text-align: left;
}

.box {
  border: dashed 1px;
}

.

: padding .

css
/* <length>  */
padding-left: 0.5em;
padding-left: 0;
padding-left: 2cm;

/* <percentage>  */
padding-left: 10%;

/*   */
padding-left: inherit;
padding-left: initial;
padding-left: unset;

padding-left . margin , .

<length>

.

<percentage>

.

padding-left = 
<length-percentage [0,]>

<length-percentage> =
<length> |
<percentage>
CSS Box Model Module Level 4, CSS Values and Units Module Level 4 . . .

css
.content {
  padding-left: 5%;
}
.sidebox {
  padding-left: 10px;
}

Specification
CSS Box Model Module Level 3
# padding-physical
0
all elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column. It also applies to ::first-letter and ::first-line.
no
Percentagesrefer to the width of the containing block
the percentage as specified or the absolute length
Animation typea length


Web Proxy Viewer  |  New URL  |  Original Page