Menu

#1398 qandaset nested tables not having inner borders

output: webhelp
open
nobody
None
5
2017-07-10
2017-07-10
cleversoft
No

I've set up a docbook 5 sample containing a table being nested in a question:

<section version="5.0" xmlns="http://docbook.org/ns/docbook">
  <title>Tables in qandasets</title>
  <qandaset>
    <qandadiv>
      <qandaentry>
        <question>
          <para>A simple table nested in a question:</para>
          <informaltable border="1">
            <tr>
              <td>a1</td>
              <td>a2</td>
            </tr>
          </informaltable>
        </question>
      </qandaentry>
    </qandadiv>
  </qandaset>
</section>

When converting to webhelp format the resulting table does not show 'inner' border lines.

I believe the culprit to be webhelp/template/common/css/positioning.css containing:

#content .qandaset>table, #content .qandaset>table td, #content .calloutlist table, #content .calloutlist table td, #content .navfooter table, #content .navfooter table td {
    border: 0px solid;
}

When changing border to 1px solid the inner borders show up. Unfortunately this is true both for the navigation table and docbook's generated qanda table as well resulting in cluttered display.

This rule's prohibits showing borders in tables used for navigation but it should not apply to user content.

My hack so far is adding additional CSS rules:

table {
   border-collapse: collapse;
}
#content .informaltable>table, #content .informaltable>table td,
#content .table-contents>table, #content .table-contents>table td {
    border: 1px solid;
}

Discussion