Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:18:08+00:00 2026-06-04T22:18:08+00:00

Here is the code for a form that I have on my page: <form

  • 0

Here is the code for a form that I have on my page:

<form id="form2" action="processRegister.php" method="post" onsubmit="return checkRegister()">
                        <h4>Register</h4>
                        <div class="reminder">Already registered? Sign in below.</div>
                        <div id="sMessage"></div>
                        <div class="field"><label>First Name:</label><input class="input" type="text" name="firstName" /></div>
                        <div class="field"><label>Last Name:</label><input class="input" type="text" name="lastName" /></div>
                        <div class="field"><label>Email (.edu):</label><input class="input" type="text" name="email" /></div>
                        <div class="field"><label>Password:</label><input class="input" type="password" name="password" /></div>
                        <div class="field"><label>Confirm Password:</label><input class="input" type="password" name="cPassword" /></div>
                        <div class="field"><input class="submit" type="submit" value="Register"/></div>
                    </form>

And here is the relevant css:

 .submit
{
    background-color:#30BEB4;
    margin:0 auto;
    display:block;
    border: 1px solid #000000
}

This centers the submit button in FF but not Chrome. How can I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:18:11+00:00Added an answer on June 4, 2026 at 10:18 pm

    Either give the submit button a width, or set the parent div to have text-align:center and remove display:block on the submit button.

    jsFiddle example (button has width)

    jsFiddle example (parent has text-align center)

    The text-align property only affects inline elements, so that’s why you’d need to remove the display:block from the input element. The margin:0 auto centering trick only works on elements that have a width.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the site. I have the submit page, and a form action to
Here is a code form a PHP+MySQL book I am reading and I am
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
Here's my code for registerFormOne.php : <html> <head> <title>Registration Form - 1 of 2</title>
I have a form that calculates a total number using Javascript. The code for
I have a login form that when submitted; redirects back to the login page.
I have some code that uses a form.submit() to open up another window when
I have a page that has a form on it where the user can
<form action= method=post id=SaveIndicationsExportForm> <table cellspacing=0 cellpadding=0 id=hover style=float: left;> <tbody> <tr> <td class=hoverButtonLeft
Here's my situation: i have a dialog form that inserts some data on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.