W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

Re: Problem with list and css ?

From: Alexander Biron <biron@ifh.de>
Date: Wed, 9 Aug 2000 17:57:34 +0200 (METDST)
To: Bodo <uchc01@pop.uni-dortmund.de>
cc: html-tidy@w3.org, gerald@w3.org
Message-ID: <Pine.HPX.4.21.0008091744060.2069-100000@hpbai1.ifh.de>
Hi Bodo,

your problem is not the style behaviour of tidy but the HTML syntax
checker. Font containing list may give the desired effect on most
browsers but is illegal HTML. You should fix the HTML first (use <div>
with style options rather than font is probably easiest).

What tidy does is the following: First it sees <font><ol>. This is
illegal. It thinks you forgot </font>. So it changes it to
<font></font><ol>. It sees the empty font tags and deletes it. So
your opening <font> is gone. After passing through the list it sees
</font>. Well no font is open any more so </font> is also deleted. Now
all font stuff is gone. Only finally tidy changes font stuff to
style. But now no font stuff remained, so you cannot get the desired
effect.

For you tidy's behaviour might seem undesirable, but it is
intended. Tidy is a very complex tool performing many tasks:

* Pretty printing code
* HTML markup corretions
* HTML -> CSS conversion
* ...

Since there does not exist a flag for only  HTML -> CSS conversion, you
always get the HTML markup corretions - whether you want them or
not. Perhaps you might ask Dave for a flag that tidy performs only one
of its various tasks (or all but one).

To give you another example: The pretty printing of tidy introduces
linebreaks which according to HTML should not matter - but which have
effects for some browsers. Somoe users therefore might want a flag to
use all of tidy's features but pretty printing...

 On Wed, 9 Aug 2000, Bodo wrote:

> Hi Dave,
> first I have to tell that I really appreciate using TIDY. It is a
> wonderful tool.
> 
> So I hope you don't mind when I report a problem to you that I got:
> I have to convert some Word 97 files to HTML and I use TIDY to clean
> them(means: I let TIDY create styles). That really works fine if there
> is no list included.
> If there is one TIDY does not convert the font attributes. I tried to
> set the options "--enclose-text true --enclose-block-text true" and
> hoped to get <p class="xxx"> ...<p> before the <li> tag but nothing like
> this happened.
> 
> Do I have to set another option?
> 
> I attach an example code (just if you want to try):
> TIDY's output:
>  <p
> 
>      class="c2">Experimente:</p>
> 
>     <ol>
>       <li>Luftschadstoffe im Autoabgas</li>

[...]
>     </ol>
> Input:
> <FONT FACE="Arial" SIZE=2><LI>Luftschadstoffe im Autoabgas</LI>
[...]
> </OL>
> </FONT>
> 
> (The text is wirtten in German, I didn't translate it, because I thought
> it is not important  )
> 
> 
> I hope that there exists an easy solution for this problem :-)
> Thanks for your attention, so far.
> 
> Bodo
> 
> 

-- 
Cheers alex          Alexander Biron

work:	http://www.ifh.de/~biron/	private:
	Tel (+49)33762-77-233   	Tel(+49)30-4948857
	mailto:biron@ifh.de    		mailto:biron@frohnau-flamingos.de
Received on Wednesday, 9 August 2000 11:57:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT