How Can i Center This Form? Anyone.

Discussion in 'HTML & Website Design' started by mandela10, Nov 20, 2009.

  1. #1
    I am trying yo center a form inside of a pop hover, I have tried to put the sign up form inside of a cell it still doesn't work, here is the screen shot of how it looks like.

    [​IMG]

    Here is the Code

    <table border="0" cellpadding="3" cellspacing="0"><tr><td><font face="Verdana" size="2"><p align="center"><strong>Sign up now To be Notified When We Have Sales and Giveaway Events </font></p><p align="center"><style>
    .link,
    .signupframe {
    color: #030000;
    font-family: Arial, Helvetica, sans-serif;
    }
    .link {
    text-decoration: none;
    }
    .signupframe {
    border: 1px solid #FFFFFF;
    background: #F4EFEF;
    }
    </style>
    <form method=post action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup2162" accept-charset="UTF-8" onsubmit="return verifyRequired2162();" >
    <input type=hidden name=redirect value="http://www.icontact.com/www/signup/thanks.html" />
    <input type=hidden name=errorredirect value="http://www.icontact.com/www/signup/error.html" />

    <div id="SignUp" style="text-align: center;">
    <table width="260" class="signupframe" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td valign=top align=center>
    <font size="1" face="Arial,Helvetica, sans-serif">*</font> <font size="2">Email</font>
    </td>
    <td align=left>
    <input type=text name="fields_email">
    </td>
    </tr>
    <input type=hidden name="listid" value="15786">
    <input type=hidden name="specialid:15786" value="2KF6">

    <input type=hidden name=clientid value="569119">
    <input type=hidden name=formid value="2162">
    <input type=hidden name=reallistid value="1">
    <input type=hidden name=doubleopt value="0">
    <TR>
    <TD> </TD>
    <TD><font size="1">*</font><font size="2"> = Required Field</FONT></TD>
    </TR>
    <tr>
    <td> </td>
    <td><input type="submit" name="Submit" value="Submit"></td>
    </tr>
    </table>
    </div>
    </form>
    <script type="text/javascript">

    var icpForm2162 = document.getElementById('icpsignup2162');

    if (document.location.protocol === "https:")

    icpForm2162.action = "https://app.icontact.com/icp/signup.php";
    function verifyRequired2162() {
    if (icpForm2162["fields_email"].value == "") {
    icpForm2162["fields_email"].focus();
    alert("The Email field is required.");
    return false;
    }


    return true;
    }
    </script></div>
    <p align="center"><a class="link" href="http://www.icontact.com"><font size="2">Email Marketing You Can Trust</font></a>
    </p></td></tr></table>

    Please, Help me fix that
     
    mandela10, Nov 20, 2009 IP
  2. Masteroa

    Masteroa Peon

    Messages:
    54
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What if you try to center the div in CSS?

    margin: 0 auto;
     
    Masteroa, Nov 20, 2009 IP
  3. tdotn

    tdotn Peon

    Messages:
    117
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    your using tables, so you can just add 'align="center" to your table

    <table width="260" class="signupframe" border="0" cellspacing="0" cellpadding="5" align="center">
    Code (markup):
     
    tdotn, Nov 20, 2009 IP