Skip to main content
HTML Validation

CSS: “padding-right”: “px” is not a “padding-right” value.

About This HTML Issue

The padding-right property in CSS requires a numerical value followed by a unit. For example, pixels (px), percentages (%), em units (em), etc. Setting padding-right: px without a number is invalid.

To fix the issue, specify a numerical value before the unit. Here’s how you can correct this:

Example of incorrect HTML with inline CSS:

<div style="padding-right: px;">Content</div>

Corrected HTML with inline CSS:

<div style="padding-right: 10px;">Content</div>

In the above example, 10px is a valid value.

Alternatively, if using an external CSS file, the incorrect CSS might look like this:

.example {
  padding-right: px;
}

Correct the external CSS by specifying a numerical value:

.example {
  padding-right: 10px;
}

Learn more:

Last reviewed: September 23, 2024

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.