We help IT Professionals succeed at work.

Form button not centering

David Schure
David Schure asked
on
76 Views
Last Modified: 2018-11-13
I am having a problem with the submit button centering....

<form id="myform" class="contact-form" action="contact.php" method="post" >
                <div class="row">
                    
                    <div class="mymail">
                        <input type="text" name="name" value="" maxlength="100" placeholder="Name"/>
                    </div>
                    
                    <div class="mymail">
                        <input type="text" name="postal_code" value="" maxlength="10" placeholder="Postal Code"/>
                    </div>
                    <div class="mymail">
                        <input type="text" name="email_address" value="" maxlength="100" placeholder="E-Mail"/>
                    </div>
                    <div class="divider" style="height: 50px"></div>
                    <div class="col-md-12">                        
                        <input class="sub-btn p-btn-medium" type="submit"></input>
                    </div>
                </div>
            </form>

Open in new window


.sub-btn,
.p-btn {
    margin-right: auto;
    margin-left: auto;
	display: inline-block;
    font-size: 15px;
    line-height: 25px;
    letter-spacing: 0.5px;
    font-weight: 300;
    padding: 6px 25px;
    border: 1px solid #3c3c3c;
}

Open in new window

Comment
Watch Question

Consultant & Challenge Subduer
CERTIFIED EXPERT
Top Expert 2009
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
RobOwner (Aidellio)
CERTIFIED EXPERT
Most Valuable Expert 2015

Commented:
change the display: inline-block to display: block;

Author

Commented:
Thank you David S.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions