Dashed table borders?

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Ed Hawco
Posts: 165
Joined: Thu Nov 07, 2013 5:50 pm
Location: Montreal
Contact:

Dashed table borders?

Unread post by Ed Hawco »

Hello. I'd like to be able to created "dashed" table borders (not in the editor; in Webhelp output). The table properties only lists "Flat, Raised, and Lowered" as options.

I thought I'd be clever and go into the XML source, where I found:

Code: Select all

<para styleclass="Normal"><table styleclass="Default" rowcount="2" colcount="1" style="width:85%; page-break-inside:avoid; border-width:0px; border-spacing:0px; border-collapse:collapse; cell-border-width:1px; border-color:#ff0000; [color=#FF0000]border-style:solid[/color]; background-color:#ffffff;">
I changed "border-style:solid" to "border-style:dashed" but it didn't stick when I went back to the Page Editor.

Is there an underlying style that's forcing it back to "solid?" Is there a workaround?

In fact I would like to define a table style using dashed borders, but I can't see any way to do that. Am I out of luck?
e
d
============================================
Ed Hawco
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Dashed table borders?

Unread post by Tim Green »

Hi Ed,

You can't change the XML like that, unfortunately (actually, fortunately...). XML may look like HTML, which is very flexible, but it is actually completely different. The main feature that makes it useful for things like project source code is that it is 100% error-intolerant. You are not allowed to do anything that is not defined in the specification, it will just not get used at all (the Help & Manual XML parser checks your code and removes anything unknown before returning to the normal topic view).

Dashed table borders are not supported in the Help & Manual specs and so you can't add them like that. If you are only targeting HTML-based output you could give the table an ID and then add your own CSS to the HTML page template (in your skin if you are using one, in your project if you are not) to give that table dashed or dotted borders. But that would be the only way to do it, and it would not work at all in non-HTML formats (PDF, RTF).
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Dashed table borders?

Unread post by Martin Wynne »

Tim Green wrote:If you are only targeting HTML-based output you could give the table an ID and then add your own CSS to the HTML page template (in your skin if you are using one, in your project if you are not) to give that table dashed or dotted borders. But that would be the only way to do it, and it would not work at all in non-HTML formats (PDF, RTF).
Hi Ed,

That method will add a dashed border around the whole table, but not between cells. H&M doesn't provide ID numbers on cells.

You can use CSS !important to avoid needing IDs or classes. Above the table insert an HTML Code Object something like this:

<style>
table { border: 3px dashed gray !important; }
td { border: 1px dotted silver !important; }
</style>

Or whatever you want. But bear in mind that this will apply to all tables in the topic.

If you are creating only Webhelp and/or CHM, I often find it easier to do the whole table in HTML. You then have total control.

regards,

Martin.
Post Reply