HTMLGen- Table Align property

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Cappy2112

    #1

    HTMLGen- Table Align property

    Does anyone know if the table align property is available in
    HTMLgen.Table?
    The docs don't show it, but I find it hard to believe that it is not
    available.

    I want to center the table.
    Only the cell align propterty is available

  • Dave Benjamin

    #2
    Re: HTMLGen- Table Align property

    Cappy2112 wrote:[color=blue]
    > Does anyone know if the table align property is available in
    > HTMLgen.Table?
    > The docs don't show it, but I find it hard to believe that it is not
    > available.
    >
    > I want to center the table.
    > Only the cell align propterty is available[/color]

    I've never used HTMLgen, but you might try wrapping your table in a DIV
    with a "style" attribute (or using the TableLite class, which also
    accepts a "style" attribute), and setting the "text-align" property:



    Hope this helps,
    Dave

    Comment

    • Dave Benjamin

      #3
      Re: HTMLGen- Table Align property

      Cappy2112 wrote:[color=blue]
      > Does anyone know if the table align property is available in
      > HTMLgen.Table?
      > The docs don't show it, but I find it hard to believe that it is not
      > available.
      >
      > I want to center the table.
      > Only the cell align propterty is available[/color]
      [color=blue][color=green][color=darkred]
      >>> print HTMLgen.TableLi te(align="cente r")[/color][/color][/color]
      <TABLE align="center"> </TABLE>
      [color=blue][color=green][color=darkred]
      >>> print HTMLgen.Div(ali gn="center")[/color][/color][/color]
      <DIV align="center"> </DIV>

      Comment

      • Cappy2112

        #4
        Re: HTMLGen- Table Align property

        Table and TableLite are different classes. Tablelite requires a little
        more work, and I will ave to rewrite some code to use it.

        I am using Table a tthe moment

        [color=blue][color=green]
        >>ith a "style" attribute (or using the TableLite class, which also
        >>accepts a "style" attribute), and setting the "text-align" property:
        >>http://www.w3schools.com/css/pr_text_text-align.asp[/color][/color]

        I'm not familiar with tall the details of CSS at the moment, nad
        learning it would only slow down my progress.

        Maybe I'll just add the align property to the class


        Thanks for your help

        Comment

        • Dave Benjamin

          #5
          Re: HTMLGen- Table Align property

          Cappy2112 wrote:[color=blue]
          > Table and TableLite are different classes. Tablelite requires a little
          > more work, and I will ave to rewrite some code to use it.
          >
          > I am using Table a tthe moment[/color]

          Well, as far as I know, wrapping a DIV align="center" around a TABLE
          should produce the same effect as giving the TABLE an align="center".

          Dave

          Comment

          • Tim Roberts

            #6
            Re: HTMLGen- Table Align property

            "Cappy2112" <cappy2112@gmai l.com> wrote:[color=blue]
            >
            >Does anyone know if the table align property is available in
            >HTMLgen.Tabl e?
            >The docs don't show it, but I find it hard to believe that it is not
            >available.
            >
            >I want to center the table.
            >Only the cell align propterty is available[/color]

            You've got the source. Surely it would have been quicker and easier to
            just Go Look It Up. That's the beauty of Python.

            No, it's not there. It's easy enough to add it, or you can wrap the table
            in <center> or <div align='center'> .
            --
            - Tim Roberts, timr@probo.com
            Providenza & Boekelheide, Inc.

            Comment

            Working...