Hello, Bloodfrost here.
On the Wings of Fire Fanon, I've created a template (in a user subpage namespace (User:Nixoli/Infobox, Nixoli being the account I use to host subpage templates because of the short name)) for a custom infobox not using the portable infobox code.
This is the content within the <onlyinclude> tags:
{|style="border-collapse: collapse; float: right; margin: 0 0 15px 15px; border: 2px solid {{{Border|#000}}}; width: 270px; background: {{{Background|#eee}}}; line-height: 25px; font-size: 13px; color: {{{TextColor|#000}}};"
|-
! colspan="2"style="background: {{{NameSection|#ddd}}}; padding: 10px 14px; line-height: 24px; text-align: center; font-size: 20px"|{{{Name|}}}
|-
{{#if: {{{Artist|}}}|
{{!}}colspan="2"style="padding:0;"{{!}}{{{Image|}}}
{{!}}-|}}
{{#if: {{{Artist|}}}|
{{!}}style="padding: 4px;"{{!}}'''Artist'''
{{!}}style="padding: 4px;"{{!}}{{{Artist|}}}
{{!}}-|}}
! colspan="2"style="padding: 10px 14px; background: {{{BGInfoSection|#ddd}}}; line-height: 24px; text-align: center; font-size: 16px;"|Background Information
{{#if: {{{Creator|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Creator'''
{{!}}style="padding: 4px;"{{!}}{{{Creator|}}}|}}
{{#if: {{{Attributes|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Primary Attributes'''
{{!}}style="padding: 4px;"{{!}}{{{Attributes|}}}|}}
{{#if: {{{Animal|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Animal'''
{{!}}style="padding: 4px;"{{!}}{{{Animal|}}}|}}
{{#if: {{{Color|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Color'''
{{!}}style="padding: 4px;"{{!}}{{{Color|}}}|}}
{{#if: {{{Song|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Song'''
{{!}}style="padding: 4px;"{{!}}{{{Song|}}}|}}
{{#if: {{{MBTI|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''MBTI Personality'''
{{!}}style="padding: 4px;"{{!}}{{{MBTI|}}}|}}
{{!}}-
! colspan="2"style="padding: 10px 14px; background: {{{InfoSection|#ddd}}}; line-height: 24px; text-align: center; font-size: 16px;"|Character Information
{{#if: {{{Tribe|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Tribe'''
{{!}}style="padding: 4px;"{{!}}{{{Tribe|}}}|}}
{{#if: {{{Age|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Age'''
{{!}}style="padding: 4px;"{{!}}{{{Age|}}}|}}
{{#if: {{{Gender|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Gender'''
{{!}}style="padding: 4px;"{{!}}{{{Gender|}}}|}}
{{#if: {{{Orientation|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Orientation'''
{{!}}style="padding: 4px;"{{!}}{{{Orientation|}}}|}}
{{#if: {{{Nicknames|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Nicknames'''
{{!}}style="padding: 4px;"{{!}}{{{Nicknames|}}}|}}
{{#if: {{{Goal|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Goal'''
{{!}}style="padding: 4px;"{{!}}{{{Goal|}}}|}}
{{#if: {{{Residence|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Residence'''
{{!}}style="padding: 4px;"{{!}}{{{Residence|}}}|}}
{{#if: {{{Occupation|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Occupation'''
{{!}}style="padding: 4px;"{{!}}{{{Occupation|}}}|}}
{{#if: {{{Relatives|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Relatives'''
{{!}}style="padding: 4px;"{{!}}{{{Relatives|}}}|}}
{{#if: {{{Abilities|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Abilities'''
{{!}}style="padding: 4px;"{{!}}{{{Abilities|}}}|}}
{{#if: {{{Weaknesses|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Weaknesses'''
{{!}}style="padding: 4px;"{{!}}{{{Weaknesses|}}}|}}
{{#if: {{{Weapons|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Weapons'''
{{!}}style="padding: 4px;"{{!}}{{{Weapons|}}}|}}
{{#if: {{{Love Interests|}}}|
{{!}}-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
{{!}}style="padding: 4px;"{{!}}'''Love Interests'''
{{!}}style="padding: 4px;"{{!}}{{{Love Interests|}}}|}}
|-style="border-bottom: 1px solid {{{BorderBottom|#ddd}}};"
|}
I've recently added the #if parser functions so that if a label is left blank, the whole label's row disappears. This works almost perfectly, except it seems to stull leave gaps. For example, this is the output if all labels are left blank:
I've removed a bunch of whitespace and newlines, but to no avail. Removing the newlines before {{#if seemed to work when looking at the default output (all blank), but it broke the template completely when the template actually had set outputs.
Is there a way to remove this blank space when parameters are not set?
Thank you in advance!