Menu

Table width attribute

Anonymous
2014-02-21
2014-02-23
  • Anonymous

    Anonymous - 2014-02-21

    Hello,

    how would you add an attribute to the table?
    For instance something similar to this:

    <TABLE width = "700">
    

    Regards

    Primoz Krzic

     

    Last edit: Psion Ski 2014-02-23
  • Psion Ski

    Psion Ski - 2014-02-23

    Hi,

    Visual style isn't part of XHTML, you should use CSS styling if you want a table with a fixed width:

    var t1 = new Table {
        new Style("width: 700px; border: 1px;"),
        new Tr { new Td { "wide table" } }
    };
    

    Will be rendered as a style tag in <head>:

    <style type="text/css">
        .cls_01b43e31 { width: 700px; border: 1px; }
    </style>
    

    And content in <body>:

    <table class="cls_01b43e31">
        <tr><td>wide table</td></tr>
    </table>
    

    If you have more questions feel free to ask, especially if there's an attribute that can't be handled by CSS - which should be considered a bug.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.