/* Keep the table from expanding when code is injected */
table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

/* Make sure the cell doesn't force wider layout */
.source-row td {
  max-width: 100%;
  overflow: hidden; /* hides anything outside the cell */
}

/* Style the code block properly */
.source-row pre {
  margin: 0;
  padding: 0.5em;
  background: #f8f8f8; /* optional */
  border-radius: 4px;

  /* The key bits: */
  white-space: pre;      /* no wrapping */
  overflow-x: auto;      /* horizontal scroll if needed */
  overflow-y: hidden;    /* avoid double scrollbars */
  max-width: 100%;       /* stay within the table cell */
  box-sizing: border-box;
}

/* Ensure code fits inside pre block */
.source-row code {
  display: inline-block;
  min-width: 100%;
}