Skip to main content

HTML Guide

CSS: “left”: Character n is neither a decimal digit number, decimal point, nor "e" notation exponential mark.

A non-numeric value is set for the left CSS property, which requires a valid length or percentage.

The left property in CSS must be assigned a value that is a length (such as px, em, rem), a percentage (ending in %), or certain keywords like auto, inherit, initial, unset, or revert. Common mistakes include missing units (for example, using left: 10; instead of left: 10px;) or attempting to use invalid strings.

Invalid example:

<div style="position: absolute; left: 10;">
  This will trigger a validation error.
</div>

Valid example with units:

<div style="position: absolute; left: 10px;">
  This is a valid use of the left property.
</div>

Valid example using a percentage:

<div style="position: absolute; left: 50%;">
  This will position the element halfway across the container.
</div>

Valid example using a keyword:

<div style="position: absolute; left: auto;">
  This uses the auto keyword for the left property.
</div>

Always specify a valid unit, percentage, or keyword for the left property to ensure HTML and CSS validation.

Learn more:

Related W3C validator issues