JSFiddle - React, Tailwind, and code Playground
by Herbert CHAN
HTML
<div id="container2">
<div id="container1">
<div id="col1">
<!-- Column one start -->
<h2>Equal height columns</h2>
<p>It does not matter how much content is in each column, the background colours will always stretch down to the height of the tallest column.</p>
<h2>2 Column Dimensions</h2>
<p>Each column is 50 percent wide with 2 percent padding on each side.</p>
<h2>No CSS hacks</h2>
<p>The CSS used for this 2 column layout is 100% valid and hack free. To overcome Internet Explorer's broken box model, no horizontal padding or margins are used. Instead, this design uses percentage widths and clever relative positioning.</p>
<h2>No Images</h2>
<p>This Two column layout requires no images. Many CSS website designs need images to colour in the column backgrounds but that is not necessary with this design. Why waste bandwidth and precious HTTP requests when you can do everything in pure CSS and HTML?</p>
<h2>No JavaScript</h2>
<p>JavaScript is not required. Some website layouts rely on JavaScript hacks to resize divs and force elements into place but you won't see any of that nonsense here.</p>
<h2>Valid XHTML strict markup</h2>
<p>The HTML in this layout validates as XHTML 1.0 strict.</p>
<!-- Column one end -->
</div>
</div>
</div>
CSS
body {
margin:0;
padding:0;
}
#container2 {
float:left;
width:100%;
background:orange; /* column 2 background colour */
}
#container1 {
float:left;
width:100%;
position:relative;
right:30%;
background:#fff689; /* column 1 background colour */
}
#col1 {
width:66%;
position:relative;
left:32%; /* 50% + 2%, */
}