Grid with 2 column

Hello,
How to make a Grid with 2 column col1 and col2.
And a button in Col1 to hide col1 and see only col2, and the press on the button you should see again col1
Thank you

Give your first column an ID of ‘c1’ and second column an ID of ‘c2’

Two buttons Show and hide

add to show button — onlick=show()
add to hide button — onclick=hide()

something like:

  <div class="btn-group" role="group"><button class="btn btn-primary" type="button" onclick="show()">Show</button><button class="btn btn-primary" type="button" onclick="hide()">Hide</button></div>

then create a new js file with the following:

function hide() {
  var e = document.getElementById("c1");
  var f = document.getElementById("c2");
  e.classList.add("col-md-12");
  e.classList.remove("col-md-6");
  f.classList.add("d-none");
}

function show() {
  var e = document.getElementById("c1");
  var f = document.getElementById("c2");
  e.classList.add("col-md-6");
  e.classList.remove("col-md-12");
  f.classList.remove("d-none");
}

Example here:
https://snippets.bss.design/

It gives you something to start with, you could probably change it to one button with a toggle function.