Supertux
Supertux

Reputation: 8318

How to get rid of the "Warning: trimming empty div" in Eclipse?

How do I stop this warning showing in Eclipse?

Warning: trimming empty <div>

No, I absolutely cannot make the div non-empty, I cannot change the code.

Upvotes: 1

Views: 3434

Answers (2)

MitMaro
MitMaro

Reputation: 5927

Even though Ionut G. Stan's method does work, it is probably not the best way to do it, since it will disable this check on all projects."

A better way would be to disable that particular validation for that project only.

To do this right click on the project in the navigator (or package explorer, etc) and select properties. In the preferences you should see "Validation", expand it and select "HTML Syntax". Check the checkbox for "Enable project specific settings". Below this, under the elements section you need to turn off "Invalid empty element tag".

Upvotes: 1

Ionuț G. Stan
Ionuț G. Stan

Reputation: 179159

You could add an HTML comment inside that DIV or go to:

Window -> Preferences -> Web -> HTML Files -> Validation

and play a bit with those values.

Upvotes: 1

Related Questions