Solved

Tidy - avoid removal of empty elements

Posted on 2010-11-07
1
1,662 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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 benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now