N8n form - how to center a custom html field

Hi everyone, I’m here again to ask for help from the experts…

I’m creating a form and I’d like to display 3 images in the form, along with a “Dropdown List” field where the person can select one of the images to vote. However, every HTML I’ve tried ends up aligned to the left of the screen.
Is there any way to center this customHtml?


Currently, the official n8n documentation does not include specific guidance on customizing visual styles within forms using the Form Trigger node or custom HTML fields. However, I’m sharing references and practices documented by both the community and n8n’s internal logic.

The Form Trigger node allows you to include HTML content using the html field type. According to community testing:

  • Content is rendered in the browser without strict sandboxing.
  • Accepts standard
    , , tags, and inline styles using the style attribute.

For example:

<div style="text-align: center;">
<p>Centered text</p>
<img src="Image_URL" alt="Example" />
</div>
1 Like

I rarely use in-built n8n forms as I find it easier to post to a webhook with custom built forms - however if you want the images centred then try this. It should center the images in the form, and also the text in the paragraph. If you are looking for the drop down to be centered then you will need to put an inline style in that similarly.


<div style="text-align: center;">
  <p>Centered text</p>
  <img src="Image_URL" alt="Example" style="display: block; margin: 0 auto;" />
</div>
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.