[Tutor] Overriding a function method(HTMLgen)
Tim Johnson
tim@johnsons-web.com
Tue Jan 21 15:48:02 2003
* Danny Yoo <dyoo@hkn.eecs.berkeley.edu> [030121 08:25]:
>
>
> 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?
Thanks Danny: Yes I did try that and all css rules were inserted into
a comment tag. And it turns out that the rules are applied. Sorry to
bother you on this! <duh>
>
>
> Good luck to you!
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com