Consider following illustration:
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?
Consider following illustration:
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?
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%";
}