[Tutor] Overriding a function method(HTMLgen)

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Tue Jan 21 12:14:02 2003


On Sun, 19 Jan 2003, Tim Johnson wrote:

>     I am implementing the HTMLgen library. Very nice. I am using the
> SimpleDocument object and wished to insert internal css code with the
> object. After looking at the code and experimenting with it, I felt that
> it wasn't possible.
>
> In HTMLgen.py at line 289, I found the following code:
>  if self.style:
>      s.append('\n<STYLE>\n<!--\n%s\n-->\n</style>\n' % self.style)
> well, all that *seemed* to do (python newbie here) was insert a comment
> tag.


Hi Tim,

Actually, I think the commenting is intentional! it's supposed to provide
compatible with older web browsers:

    http://www.devguru.com/Technologies/html/quickref/html_style.html

So you may not even need to change anything.  Can you check to see if
using the unmodified HTMLgen code allows your CSS pages to work too?


Good luck to you!