Pages: 1
Print
Author Topic: Table output in HTML  (Read 2704 times)
linjinwei
Member

Posts: 65


« on: January 06, 2009, 01:40:57 AM »

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?

Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1546



WWW
« Reply #1 on: January 08, 2009, 01:56:29 PM »

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 <table> 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).
Logged
linjinwei
Member

Posts: 65


« Reply #2 on: January 08, 2009, 07:38:06 PM »

Do u mean the commomltr.css file?
Path = C:\Program Files\Common Files\XMetal Shared\DITA_OT\resource


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



Thks in advance


Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1546



WWW
« Reply #3 on: January 08, 2009, 08:12:29 PM »

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.
Logged
Pages: 1
Print
Jump to: