W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2002

RE: Empty <div> tags

From: Cox, Charlie <ccox@cincom.com>
Date: Fri, 13 Dec 2002 13:57:42 -0500
Message-ID: <399E1F52E73BD41194A800D0B74A08AB01E4DD84@skipper.cincom.com>
To: "'Charles Reitzel'" <creitzel@rcn.com>
Cc: "'html-tidy@w3.org'" <html-tidy@w3.org>



> -----Original Message-----
> From: Charles Reitzel [mailto:creitzel@rcn.com]
> Sent: Friday, December 13, 2002 12:39 PM
> To: Cox, Charlie
> Cc: 'html-tidy@w3.org'
> Subject: Re: Empty <div> tags
> 
> 
> Hi Charlie,
> 
> Adding an attribute should keep it from getting deleted, but it 
> doesn't.  For example, Tidy will still drop the following:
> 
> <div class="foo"></div>
> 
> This would be a simple fix, but I'm not sure what the side 
> effects would be.  

could you make an option that would be disabled by default?

> Am I right in thinking that empty block elements with attributes 
> should not be dropped?
> 

This is correct.

> Also, out of curiosity, what kind of style is useful for an empty DIV?
> 

we have about 500 forms that are converted from PDF and they use the style
attribute that defines border-top,border-left,top,left, and width to draw
lines duplicating the converted form. 

i.e.
<DIV
STYLE="position:absolute;top:168px;left:0px;width:729px;border-top-style:sol
id;border-top-width:1px;border-top-color:#000000;"></DIV>

There can be hundreds of these per form.
Charlie


> take it easy,
> Charlie
> 
> At 08:42 AM 12/13/2002 -0500, Cox, Charlie wrote:
> 
> >Is there any way to turn off the dropping of empty DIV 
> elements? I have 
> >CSS styles applied to empty DIV elements such that they do 
> provide a purpose.
> >
> >Charlie
> 
Received on Friday, 13 December 2002 14:00:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:48 UTC