How to align fields to center.

  • Profile Image
    Meagan
    Asked on February 02, 2016 at 03:36 AM
    For some reason I am unable to center the form on the webpage. The form is placed into a Joomla article and situated inside a paragraph tag that is centered. It seems that the fields are not centered inside the form's own 900px width, and this is the problem. I have injected the following CSS with no results:

    .form-all {
    text-align: center;
    }

    What would you suggest?

    Thanks!

  • Profile Image
    Chriistian
    Answered on February 02, 2016 at 03:51 AM

    You can inject this css to move the fields to the center.

    #id_1,#id_3,#id_13,#id_4,#id_5,#id_10,#id_14,#id_11,#id_6, #id_17,#id_16,#id_12,#id_18{

    padding-left:300px;

    }

    This selects some of the fields that are not aligned properly and adds a padding to align them to the center. You can also adjust the value of the highlighted number to fit your preference.