Solved

Tidy - avoid removal of empty elements

Posted on 2010-11-07
1
1,700 Views
Last Modified: 2012-05-10
Hello,

we'd like to avoid removing empty elements with tidy, such as:
<span class="test"></span>

Open in new window


since we need it for several css hacks. We know the option to just include an escaped whitespace:
<span class="test">&nbsp;</span>

Open in new window


but that's not really an option. Also we cannot add name or id attributes, since otherwise any single span element would need a unique name.

Is there a way in the tidy options to configure NOT to remove empty tags?

Thanks and bests
0
Comment
Question by:semantique
1 Comment
 
LVL 9

Accepted Solution

by:
pg-expert earned 500 total points
ID: 34081703
what you are using is the best option to avoid tidy removing empty tags.

~PG
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Accessing specific element - DOM PHP HTML 8 35
PHP Mail error 3 27
Button on Table, name table1 not working 4 22
Checking https returns 301 21 25
This article discusses four methods for overlaying images in a container on a web page
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question