0

Firefox issue: Does anyone know how to stop the table cell from shrinking and growing? Type a letter on the line and the cell shrinks (watch the space below the line); delete the letter and the cell grows back.

I tried with a div instead of a span and the cell shrinks but stays shrunk when the content is deleted.

I tried it without Bootstrap and it's the same.

span {
  border-width: 0 0 1px !important;
  border: 1px solid black;
  display: inline-block;
  max-width: 225px;
  min-width: 175px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

<table id="table" class="table table-bordered table-condensed table-hover">
  <tr>
    <th>
      header
    </th>
  </tr>
  <tr>
    <td>
      <span contenteditable="true"></span>
    </td>
  </tr>
</table>
wazz
  • 4,953
  • 5
  • 20
  • 34
  • seems to be working on for me in Chrome – Clint Jan 30 '21 at 00:32
  • Sry, forgot to add Firefox. Updated. – wazz Jan 30 '21 at 00:39
  • For tables in Firefox, bootstrap is mentioning a fix https://getbootstrap.com/docs/3.4/css/#tables-responsive Is this what you are looking for? More info on https://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685 – bron Jan 30 '21 at 00:49
  • @bron No, I'm not using `.table-responsive`, so that's not it. (I tested it just in case.) – wazz Jan 30 '21 at 00:52

0 Answers0