# NO BUG: Display: none - does not hide element wrapper and causes spacing issues

**URL:** <https://forum.bricksbuilder.io/t/no-bug-display-none-does-not-hide-element-wrapper-and-causes-spacing-issues/29341>\
**Category:** Bugs\
**Tags:** v1-11-1-1\
**Created:** [January 13, 2025, 7:07am UTC](https://forum.bricksbuilder.io/t/no-bug-display-none-does-not-hide-element-wrapper-and-causes-spacing-issues/29341 "2025-01-13T07:07:28Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [January 15, 2025, 9:16am UTC](https://forum.bricksbuilder.io/t/no-bug-display-none-does-not-hide-element-wrapper-and-causes-spacing-issues/29341/7 "2025-01-15T09:16:28Z")

</div>

Hi Milan,  
Thanks for the video and especially the link to the website!

Briefly summarized:

You insert an icon, set a link on the icon, and then set the display property to none. The result is that the icon is hidden, not the a-tag (the link) around it. Accordingly, the gap is still present, as the styles are still applied to the icon itself and not to the link, as in 99.9% of cases, you want to style the icon and not the link around it.

However, there is a straightforward and painless solution for this.

1. remove the link from the icon.
2. instead, wrap the icon with a div.
3. change the HTML tag of the div to a[link] and set your link
4. set the display property of the div/link to none

Result: no gap, because you apply the display:none value directly to the wrapper instead of the icon 🙂

---

_[View the full topic](https://forum.bricksbuilder.io/t/no-bug-display-none-does-not-hide-element-wrapper-and-causes-spacing-issues/29341)._
