Skip to content

render document - table row with width set as % value #420

@m32

Description

@m32

Sometimes, document renders HTML unexpectedly, and the whole thing depends on the max_width parameter.

Value calculated by documentcontainer is 1108 and the table renders incorrectly. In the range of 1100-1150, the error occurs at widths of 1103, 1108, 1113, 1118, 1123, 1128, and 1133.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <head>
    <style type="text/css">
      body {
        background-color: #ffffff;
        color: #000000;
        font-family: "Arial", sans-serif;
        font-size: 11pt;
        margin: 0;
        padding: 1px 5%;
      }
      div.deklaracja {
        width: 100%;
        min-width: 480px;
        margin-left: auto;
        margin-right: auto;
      }
      .normalna {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        border: 1px solid black;
      }
      .wypelniane {
        background-color: white;
        border: 1px solid black;
        font-size: 1.2em;
        padding: 1px;
        vertical-align: top;
        text-align: left;
      }
      .niewypelnianeopisy {
        background-color: #dddddd;
        border: 1px solid black;
        font-size: 0.8em;
        padding: 1px;
        height: 2em;
        vertical-align: top;
        text-align: left;
        font-weight: bold;
      }
      .opisrubryki {
        font-size: 0.5em;
        margin-bottom: 0.2em;
        text-align: left;
        font-weight: bold;
        text-transform: none;
      }
      .kwota {
        text-align: right;
        padding-right: 0.2em;
      }
    </style>
  </head>
  <body>
    <div class="deklaracja">
      <table class="normalna">
        <tr>
          <td class="niewypelnianeopisy" style="width: 75%">
            Sk&#322;adki na ubezpieczenia spo&#322;eczne, o kt&#243;rych mowa w przepisach ustawy, podlegaj&#261;ce odliczeniu od dochodu <font style="font-weight: normal"><sup>20)</sup></font>, w tym zagraniczne, o kt&#243;rych mowa w art. 26 ust. 1 pkt 2a ustawy, z wyj&#261;tkiem wykazanych w poz. 96
          </td>
          <td class="wypelniane" style="width: 25%">
            <div class="opisrubryki">95.</div>
            <div class="kwota">29403 z&#322;, 26 gr</div>
          </td>
        </tr>
      </table>
      <table class="normalna">
        <tr>
          <td class="wypelniane" style="width: 100%">
            <div class="opisrubryki">11. Rodzaj obowi&#261;zku podatkowego podatnika</div><input type="checkbox" checked="checked" disabled="disabled" />
            1. nieograniczony obowi&#261;zek podatkowy (rezydent)
          </td>
        </tr>
      </table>
    </div>
  </body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions