Reputation: 390
I want to toggle a div using it's width or height. But when i am setting it's width to 0 it's inner element is visible. So, how to achieve this toggle width functionality?
a {
display: block;
}
div {
width: 100%;
background: black;
color: orange;
}
div {
width: 0;
}
<div>
<p>This is a para</p>
</div>
Upvotes: 0
Views: 292