On a phone, the last page of my n8n form ran off the right edge of the screen, while the three pages before it fit. That last page is the Form Ending page, and n8n draws it 448 pixels wide on every screen. A short CSS rule in the node’s Custom Form Styling option made it fit on mobile.
What I Was Doing
I was checking the event sign-up form from How to Set Up and Run the Event Sign-up Form for n8n on a phone-sized screen, 390 pixels wide, in n8n 2.49.5 running in Docker. The form has three pages and ends with an n8n Form node set to Form Ending, which shows You’re booked! with the visitor’s name, session and seats.
What I Expected
The last page to fit the screen, like the three pages before it.
What I Got
The three form pages fit. The last page didn’t: its box ran past the right edge of the screen, and the end of the message was cut off.

What I Checked
Only the last page was too wide, so I compared the two templates n8n builds its form pages from, in n8n’s GitHub repository at version 2.49.5:
- form-trigger.handlebars (opens in a new tab) builds the form pages. It has a rule for screens up to 500 pixels wide that makes the page fit.
- form-trigger-completion.handlebars (opens in a new tab) builds the Form Ending page. It has no rule for small screens, and its box always takes the width set at the top of the file,
--container-width: 448px.
.container {
margin: auto;
text-align: center;
padding-top: var(--padding-container-top);
width: var(--container-width);
}
Why It Happens
A phone’s screen is narrower than 448 pixels; this one is 390. The Form Ending page keeps its 448-pixel box on every screen, so on a phone the box runs past the edge. The form pages don’t have this problem: on screens up to 500 pixels wide, n8n makes them 95% of the screen’s width and drops the border around the box.
The Fix
Give the Form Ending page the same rule for small screens. The node has an option for this, Custom Form Styling, which n8n’s Form node docs (opens in a new tab) describe as overriding the default styling of the form with CSS. n8n adds this CSS after its own styles, so your rules win.
Open your workflow and double-click the Form Ending node. Under Options, click Add option, then Custom Form Styling:

n8n adds the option and fills its box with its default styles: a list of fonts, sizes and colours, the same values the page already uses.

Click in the box, select everything (Cmd+A on a Mac, Ctrl+A on Windows) and paste these lines in its place:
/* Fit the page to phone screens */
@media only screen and (max-width: 500px) {
.container {
width: 95%;
padding: 24px;
}
.card {
padding: 0;
border: 0;
box-shadow: none;
}
}
The rule works only on screens up to 500 pixels wide, with the values n8n’s form pages use there: the page takes 95% of the screen, and the box around the message loses its border. On a computer, nothing changes.

Close the node. n8n saves the change as you work, but the live form keeps the published version until you click Publish again; How to Publish a Workflow in n8n shows how. If the workflow has more than one Form Ending node, add the same lines to each.
After the Fix
With the lines in place and the workflow published, I booked again on the same 390-pixel screen. The last page now fits, laid out like the pages before it:

On a computer, the page looks the same as before.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Adding the CSS to the Form Trigger or to a form page | The ending page is still cut off: it uses only its own node’s Custom Form Styling | Add it under the Form Ending node’s Options |
| Adding it to one Form Ending node when the workflow has several | The other ending pages are still cut off on phones | Add the same lines to every Form Ending node |
| Not publishing again after the change | The live form still shows the old ending page | Click Publish again |
FAQ
Does the CSS change the page on a computer?
No. It sits inside a rule for screens up to 500 pixels wide, so wider screens keep n8n’s usual layout.
Do the form pages need it too?
No. n8n already lays them out for small screens. Only the Form Ending page lacks that rule.
Can I keep n8n’s default styles in the box?
Yes. They hold the same values the page already uses, so you can paste the lines after them instead of replacing them.
Does a Form Ending set to Show Text have this problem?
No. With Show Text, n8n shows your own HTML instead of its 448-pixel box, so the layout is whatever your HTML sets.
Conclusion
n8n’s Form Ending page is 448 pixels wide on every screen, so it runs off a phone’s screen while the form pages adapt. Add the phone rule to each Form Ending node under Options › Custom Form Styling, publish again, and the last page fits like the rest of the form.
Additional Resources
- n8n Form node (opens in a new tab), n8n’s docs: the Form Ending page and its options
- form-trigger-completion.handlebars (opens in a new tab) at n8n 2.49.5, n8n’s GitHub repository: the template of the Form Ending page
- form-trigger.handlebars (opens in a new tab) at n8n 2.49.5, n8n’s GitHub repository: the template of the form pages, with their rule for small screens
Related
- n8n Tutorial — Part 5: Forms: Collect Data with n8n Forms
- How to Set Up and Run the Event Sign-up Form for n8n
- How to Redirect After an n8n Form Submission
- How to Publish a Workflow in n8n
n8n and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by n8n GmbH.
0 comments