---
title: "Discussion on \"Aligning a Button in a Form\" | Hashnode"
description: "Discussion on \"Aligning a Button in a Form\". #1. If you're trying to center a button in a form, you can do it easily by placing a parent div to the button with class text-center.\n<div class=\"text-center\">\n     <button type=\"button\" class=\"btn btn-primary px-3\">Subscribe me to the Newsletter</bu..."
url: "https://hashnode.com/posts/aligning-a-button-in-a-form/62b45a40b86f939ac81b0086"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Aligning a Button in a Form](https://bootstrap5.in/aligning-a-button-in-a-form?utm_source=hashnode&utm_medium=feed)

#1. If you're trying to center a button in a form, you can do it easily by placing a parent div to the button with class text-center. <div class="text-center"> <button type="button" class="btn btn-primary px-3">Subscribe me to the Newsletter</bu...

Jun 23, 2022 · 1 min read · bootstrap5.in  
Read the article

-   [#form](https://hashnode.com/tag/form)
-   [#display](https://hashnode.com/tag/display)
-   [#bootstrap-5](https://hashnode.com/tag/bootstrap-5)
-   [#button](https://hashnode.com/tag/button)
-   [#block](https://hashnode.com/tag/block)

## Written by

[Anjanesh Lekshminarayanan](https://hashnode.com/@anjanesh)

@anjanesh · Navi Mumbai, MH

  
[View profile](https://hashnode.com/@anjanesh)

Web UI Engineer

I am a web consultant from Navi Mumbai. Mainly dealt with LAMP stack, now into Django and getting into Laravel and Cloud. Founder of nerul.in and gaali.in

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
