0

Consider following illustration: enter image description here

DIV ONE occupies entire screen, and on button press it is shrinked to 50% and DIV TWO occupies right 50% space.

How can I achieve this using css or scss?

bpeterson76
  • 12,918
  • 5
  • 49
  • 82
Thinker
  • 5,326
  • 13
  • 61
  • 137

1 Answers1

1

Hope this will help you, it's easy to achieve this in Javascript:

Your button:

<button onclick="yourFunction()">Button</button>

Javascript:

function yourFunction(){
    document.getElementById('divOne').style.width = "50%";
}
Lukas A
  • 173
  • 9