I have a scenario where I am working with two div elements and a span element in between. The parent div element does not have a defined height, it is calculated based on the content within the div. However, the span element's height is set to 100% even though its actual height is zero. Here is the code snippet:
<div id="parentDiv">
<div id="child1"></div>
<span id="spanelement"></span>
<div id="child2"></div>
</div>
<style>
#spanelement{
height:100%;
width:100%;
}
</style>
Any suggestions on how to resolve this issue would be greatly appreciated. Thank you.