Skip to content

[BUG] #1150

@YoofiBP

Description

@YoofiBP

Describe the bug:
I am rendering a table but cannot seem to obtain full widths when using both percentages and pixels. I even tried wrapping the HTML widget in a full width container.

Below is what it looks like
Screenshot 2022-09-28 at 7 55 05 PM

HTML to reproduce the issue:

<table width="2000px">
 <tr>
  <td colspan="2" style="border:2px solid black">Some other text</td>
  <td style="border:2px solid black">Some text</td>
 </tr>
 <tr>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
 </tr>
 <tr>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
 </tr>
</table>

Html widget configuration:

Html(
        style: {
          "table": Style(width: 5000)
        },
        data: """<table width="2000px">
 <tr>
  <td colspan="2" style="border:2px solid black">Some other text</td>
  <td style="border:2px solid black">Some text</td>
 </tr>
 <tr>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
 </tr>
 <tr>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
  <td style="border:2px solid black">Hello</td>
 </tr>
</table>""",)

Expected behavior:
Screenshot 2022-09-28 at 7 55 58 PM

Screenshots:

Device details and Flutter/Dart/flutter_html versions:
Flutter version: 2.5.3
Dart version: 2.14.4
flutter_html: 2.2.1

Stacktrace/Logcat

Additional info:

A picture of a cute animal (not mandatory but encouraged)

Metadata

Metadata

Assignees

No one assigned

    Labels

    <table>Issues with table renderingbugSomething isn't working

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions