How can I show a Child Div while keeping its Parent Div hidden? Can this be done?
My Code is below:
<style> .Main-Div{ display:none; } </style> <div class="Main-Div"> This is some Text.. This is some Text.. <div class="Inner-Div'> <a href="#"><img src="/image/pic.jpg"></a> </div> This is some Text.. This is some Text.. </div>
Set the parent class's visibility to hidden or collapse. Set the child to visible. Something like this:
.parent>.child { visibility: visible; } .parent { visibility: hidden; width: 0; height: 0; margin: 0; padding: 0; }
Full example: http://jsfiddle.net/pread13/h955D/153/
Edited with help from @n1kkou
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With