Add other class attributes to HTMLgen tags?

A

adeger

For use of CSS how do I do something
like insert a 'class' attribute into an
HTML tag like:

<TABLE class='standard'></TABLE>

I've really made a good faith effort to find this
in the documentation and elsewhere on the web with
no luck.

Thanks in advance,
ard
 
G

Gerrit Muller

adeger said:
For use of CSS how do I do something
like insert a 'class' attribute into an
HTML tag like:

<TABLE class='standard'></TABLE>

I've really made a good faith effort to find this
in the documentation and elsewhere on the web with
no luck.

Thanks in advance,
ard

I use the following work-around:

icons = TD(**{"class":"icons"})

kind regards, Gerrit
 
D

Duncan Booth

adeger said:
For use of CSS how do I do something
like insert a 'class' attribute into an
HTML tag like:

<TABLE class='standard'></TABLE>

I've really made a good faith effort to find this
in the documentation and elsewhere on the web with
no luck.

The HTMLgen library lowercases all attribute names, so you should be able
to use an attribute name such as 'Class' or 'CLASS' without problems:

table = TableLite(Class='standard')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top