This is a generic error page which should help you in general with errors of this type. Refer below to the specific examples for more precise advice.

How to fix: Duplicate id X.

Most Likely Cause and Fix

The value X has already been used for an id attribute.

Find all attribute occurrences of the form … id="X" … and ensure each has a unique value within the given document.

What This Error Means

The id attribute is used to uniquely identify a single element within a document:

<img src="http://example.com/header.png" id="header-image" >

In order to uniquely identify a single element, the value of the id attribute must be unique within the given document.

This error is telling you that the value X has already been used for an id attribute.

How To Fix It

Find all attribute occurrences of the form … id="X" … and ensure each has a unique value within the given document.

For example, use:

<div id="X-foo">
  <p>Foo</p>
</div>

<div id="X-bar">
  <p>Bar</p>
</div>

instead of:

<div id="X">
  <p>Foo</p>
</div>

<div id="X">
  <p>Bar</p>
</div>

Discuss, Comment and Improve

Did this help you? Can this page be improved? Let us know!

comments powered by Disqus