Is there a way to toggle a div's width or height? I tried setting the width to 0, but the inner element remained visible. Any suggestions on how to achieve this toggle width functionality?
Check out the solution on JS Fiddle
a {
display: block;
}
div {
width: 100%;
background: black;
color: orange;
}
div {
width: 0;
}
<div>
<p>This is a para</p>
</div>