<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
div{
border: 1px solid #267326;
padding: 10px;
margin-bottom: 25px;
column-count: 2;
-webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
}
h2{
-webkit-column-span: none;
column-span: none;
text-align: center;
}
</style>
</head>
<body>
<h1>CSS column-span Property</h1>
<div>
<h2>About J. K. Rowling</h2>
Joanne Rowling was born on 31st July 1965 at Yate General Hospital near Bristol, and grew up in Gloucestershire in England and in Chepstow, Gwent, in south-east Wales.Her father, Peter, was an aircraft engineer at the Rolls Royce factory in Bristol and her mother, Anne, was a science technician in the Chemistry department at Wyedean Comprehensive, where Jo herself went to school.
</div>
<button onclick="myFunction()">Click Me</button>
<script>
var x = document.getElementsByTagName("h2")[0];
function myFunction(){
x.style.columnSpan = "all";
x.style.WebkitColumnSpan = "all";
x.style.MozColumnSpan = "all";
}
</script>
<p><strong>Note</strong>: Click on the button to change the column-span from none to all.</p> </body>
</html>