How to align form at the center of the page in html/css

后端 未结 6 507
粉色の甜心
粉色の甜心 2021-02-05 13:28

I am new to html/css. i am trying to build up my own form and i am trying to align it in the center. I used the align property in css but its not working.

Html code:

6条回答
  •  梦如初夏
    2021-02-05 13:58

    1. Wrap the element inside a div container as a row like your form here or something like that.
    2. Set css attribute:
      • width: 30%; (or anything you want)
      • margin: auto; Please take a look on following picture for more detail.

提交回复
热议问题