<!DOCTYPE html> <head> </head> <body> <div style="display: table" id="x"> <div style="display: table-row"> <div style="display: table-cell">1 - 1</div> <div style="display: table-cell">1 - 2</div> </div> <div style="display: table-row"> <div style="display: table-cell">2 - 1</div> <div style="display: table-cell">2 - 2</div> </div> </div> <div style="border: 2px solid green">This is a test</div> <span style="border: 2px solid green">before<div>This is a test</div>after</span> </body>