For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/padding-left.md.
Lynx
  • English
  • padding-left

    Introduction

    Sets the width of the padding area on the left of an element. Negative values are not allowed for padding.

    Examples

    Syntax

    /* <length> values */
    padding-left: 0.5em;
    padding-left: 0;
    
    /* <percentage> value */
    padding-left: 10%;

    Values

    0px

    Default value.

    <length>

    The size of the padding as a fixed value. Must be nonnegative.

    <percentage>

    The size of the padding as a percentage, relative to the inline size (width) of the containing block.

    Formal definition

    Initial value0
    Applies toall elements
    Inheritedno
    Animatableyes
    Percentagesrefer to the width of the containing block

    Formal syntax

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

    Difference with the Web

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.