Add other class attributes to HTMLgen tags?

Discussion in 'Python' started by adeger, Sep 21, 2004.

  1. adeger

    adeger Guest

    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
    adeger, Sep 21, 2004
    #1
    1. Advertising

  2. adeger wrote:

    > 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
    --
    Gaudi systems architecting:
    <http://www.extra.research.philips.com/natlab/sysarch/>
    Gerrit Muller, Sep 22, 2004
    #2
    1. Advertising

  3. adeger

    Duncan Booth Guest

    adeger wrote:

    > 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')
    Duncan Booth, Sep 22, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    629
  2. Replies:
    0
    Views:
    509
  3. Alec S.
    Replies:
    10
    Views:
    10,147
    Alec S.
    Apr 16, 2005
  4. HTMLgen docs, tutorial

    , Oct 1, 2003, in forum: Python
    Replies:
    4
    Views:
    795
    John Dean
    Oct 3, 2003
  5. Dave
    Replies:
    0
    Views:
    451
Loading...

Share This Page