DITA and XMetaL Discussion

  • linjinwei

    Table output in HTML

    Participants 2
    Replies 3
    Last Activity 14 years ago

    Hi guys. Take a look at this. I am using Normal Table.

    When I create a table in XMetal, this is what it looks like;

    Then when i output it in PDF, this is what it looks like (similar as in XMetal);

    But when I output it in HTML, the table appears strink and the borders are light and near invisible. Can this be fixed so that it looks the same as in XMetal and PDF?



    Derek Read

    Reply to: Table output in HTML

    There are at least a few ways to accomplish this for XHTML output.

    Please refer to the “pgwide” attribute description in the DITA Language Reference for the

    element. If you prefer not to handle this in the XML source you can alter the XSLT that generates your XHTML so that all tables have their “width” attribute set to “100%” (or something close to that), or you could simply add a CSS property to your CSS file that gives all table elements a width of “100%” (or something close to that), or just specific table elements with a specific “class” attribute using the DITA “outputclass” attribute (again, please refer to the DITA Language Reference for details).



    Reply to: Table output in HTML

    Do u mean the commomltr.css file?
    Path = C:Program FilesCommon FilesXMetal SharedDITA_OTresource

    It doesnt have any table attributes inside. So how should I set the table width to 100% here?

    Thks in advance


    Derek Read

    Reply to: Table output in HTML

    Using the selector for the element and the corresponding CSS property should do it (most modern browsers will support this).

    table {width:100%}

    Probably worth having a look here:

    …and here's a specific example (and a whole page on styling tables):

    When it comes to CSS and HTML / XHTML there are literally perhaps thousands of websites that can help you. Your favorite search engine is your best friend in this case.


  • You must be logged in to reply to this topic.

Lost Your Password?