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';
document.body.appendChild(container);

var cell = document.createElement('span');
cell.style.display = 'block';
cell.style.border = ' 2px solid black';
cell.style.width = '200px';
cell.style.height = '20px';

// Added
cell.style.float = 'left';

cell.style.overflow = 'hidden';
container.appendChild(cell);


var cell2 = document.createElement('span');
cell2.style.display = 'block';
cell2.style.border = ' 2px solid black';
cell2.style.width = '200px';
cell2.style.height = '20px';

// Added
cell2.style.float = 'left';

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);