Jump to content

skyhrg

Members
  • Posts

    1
  • Joined

  • Last visited

skyhrg's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi, I have the following codes: HTML <body> <div id="main_body"><img name="elvislogo" src="elvislogo.gif" width="229" height="32" border="0" alt="Make Me Elvis"><p>Enter your first name, last name, and email to be added to the <strong>Make Me Elvis</strong> mailing list.</p> <form method="post" action="addemail.php" id="main_form"><div class="table_row"><p><label for="firstname">First name:</label></p><p><input type="text" id="firstname" name="firstname"></p></div> <div class="table_row"><p><label for="lastname">Last name:</label></p><p><input type="text" id="lastname" name="lastname"></p></div> <div class="table_row"><p><label for="email">Email:</label></p><p><input type="text" id="email" name="email"></p></div> <div class="table_row"><p></p><p><input type="submit" name="Submit" value="Submit"></p><p></p></div> </div> </form> </body> CSS #main_form { display : table;border-spacing : 5px;border : thin dashed grey;background-color : pink; } div.table_row { display : table-row; } div.table_row p { display : table-cell; }div.table_row p:first-child { text-align : right; } div#main_body { width : 400px; margin : auto; padding : 10px; } input, textarea { margin : 5px; } I want to make the submit button centered, but I don't know how to go about this - I'd make a table row and then place the button, but I don't know how to style the centering. Successfully solved solution would be appreciated. BTW, this code is from a book.
×
×
  • Create New...