DITA and XMetaL Discussion

  • linjinwei

    Table output in HTML

    Participants 2
    Replies 3
    Last Activity 13 years, 8 months 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;
    [img]http://img522.imageshack.us/img522/6744/tabledisplayxmetalwj7.jpg[/img]

    Then when i output it in PDF, this is what it looks like (similar as in XMetal);
    [img]http://img114.imageshack.us/img114/1446/tabledisplaypdfzx2.jpg[/img]

    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?

    [img]http://img114.imageshack.us/img114/275/tabledisplayhtmlzc8.jpg[/img]

    Reply

    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

    linjinwei

    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

    Reply

    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).

    Example:
    table {width:100%}

    Probably worth having a look here:
    http://www.w3.org/Style/CSS/learning

    …and here's a specific example (and a whole page on styling tables):
    http://dev.opera.com/articles/view/33-styling-tables/#tableandcellwidth

    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.

    Reply

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

Lost Your Password?

Products
Downloads
Support