# Blank space when custom box is empty

**URL:** <https://community.silverfin.com/t/blank-space-when-custom-box-is-empty/1621>\
**Category:** Templates\
**Created:** [December 2, 2019, 2:14pm UTC](https://community.silverfin.com/t/blank-space-when-custom-box-is-empty/1621 "2019-12-02T14:14:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefan.Temelie](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Stefan.Temelie](https://community.silverfin.com/u/Stefan.Temelie)\
**Post date:** [December 2, 2019, 2:14pm UTC](https://community.silverfin.com/t/blank-space-when-custom-box-is-empty/1621/1 "2019-12-02T14:14:04Z")

</div>

Hi,

If i do not have any text in the custom.box.b1 once i preview the code it shows an empty space between “Sales Ledger” and the Header.  
Is there a way i can prevent that empty space from appearing ?

Thank you for your help.  
Stefan

````auto
{% ic %}{% input custom.tick.section_A as:boolean %}{% endic %}{% if custom.tick.section_A %}{::font size="m"}**{% assign nbr = nbr | plus:1 %}{{ nbr }}) Sales ledger**{:/font}{% else %}|{% ic %}{::font size="m"} Sales ledger{:/font}{% endic %} {% endif %}
{% if custom.tick.section_A %}
{% input custom.box.b1 as:text size:mini default:b1 %}{% fori item in custom.section_A %}
**{% input item.header placeholder:'Header' %}** {% input item.attachment1 as:file_collection %}
{% input item.description as:text placeholder:'Description' %}```
````

---

<div class="post-metadata">

**Author:** ![Daria\_Bobukh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/daria_bobukh/32/1077_2.png) [@Daria\_Bobukh](https://community.silverfin.com/u/Daria_Bobukh)\
**Post date:** [December 2, 2019, 4:59pm UTC](https://community.silverfin.com/t/blank-space-when-custom-box-is-empty/1621/2 "2019-12-02T16:59:58Z")

</div>

Hi @Stefan.Temelie,

I can’t really see any issue with the code you sent. In preview I do not have any unnecessary gap between Sales ledger and Header. However, if you want to eliminate the unnecessary line breaks between the title and header you could use {% stripnewlines %}{% endstripnewlines %} and {% newline %} at the end of each line. If you don’t want to show an input box in preview if it is empty use ‘ifi’ tag. See an example of the code below:

```auto
{% stripnewlines %}
{% ic %}{% input custom.tick.section_A as:boolean %}{% endic %}
{% if custom.tick.section_A %}
{::font size="m"}**{% assign nbr = nbr | plus:1 %}{{ nbr }}) Sales ledger**{:/font}{% newline %}
{% else %}
|{% ic %}{::font size="m"} Sales ledger{:/font}{% newline %}{% endic %}
{% endif %}

{% if custom.tick.section_A %}

{% ifi custom.box.b1 != blank %}{% input custom.box.b1 as:text size:mini default:b1 %}{% newline %}{% endifi %}
{% fori item in custom.section_A %}
**{% input item.header placeholder:'Header' %}** {% input item.attachment1 as:file_collection %}{% newline %}
{% input item.description as:text placeholder:'Description' %}{% newline %}
{% endfori%}

{% endif %}
{% endstripnewlines %}

```

Let me know if you have any further questions.
