JSFiddle - React, Tailwind, and code Playground
by borglinm
JavaScript
var container = document.createElement('span');
container.style.display = 'inline-block';
container.style.marginTop = '10px';
container.style.marginLeft = '50px';
container.style.background = 'lightblue';
// Added
container.style.lineHeight = '0px';
document.body.appendChild(container);
var cell = document.createElement('span');
cell.style.display = 'inline-block';
cell.style.border = ' 2px solid black';
cell.style.width = '200px';
cell.style.height = '20px';
// Added
cell.style.lineHeight = '20px';
cell.style.overflow = 'hidden';
container.appendChild(cell);
var cell2 = document.createElement('span');
cell2.style.display = 'inline-block';
cell2.style.border = ' 2px solid black';
cell2.style.width = '200px';
cell2.style.height = '20px';
// Added
cell2.style.lineHeight = '20px';
cell2.style.overflow = 'hidden';
container.appendChild(cell2);
var text_node = document.createTextNode('hallo hallo hallo hallo hallo hallo hallo hallo hallo hallo hallo hallo hallo hallo hallo hallo ');
cell.appendChild(text_node);