I have a parent div which contains two elements, a small tag and an a tag. Currently, we can see that the parent wrapper has a height and width.
Now, I need to remove that small tag whilst keeping the space that the a tag would take up. I've tried applying both display: block and display: inline-block to the anchor tag but as soon as the small tag is removed, the parent wrapper collapses.
Any help would be greatly appreciated.
https://jsfiddle.net/jghdewqv/
.wrapper {
background-color: lightblue;
}
a {
background-color: firebrick;
display: block; /* Also tried inline-block */
float: right;
}
small {
background-color: pink;
}
<div class="wrapper">
<small>Left text here</small>
<a href="#">Some link here</a>
</div>