We help IT Professionals succeed at work.

Help with centering form

vcharles
vcharles asked
on
Hello,

I am using the code below to center my form, but it is only centering from the left and right borders, my table shows all the wax to the top of the screen, How do I modify the code to also center from top and bottom borders?

Victor
Comment
Watch Question

where is your code?

Author

Commented:
Hello,

Below is my code:
<head runat="server">
    <title>AOP-8 Prototype</title>
    <style type="text/css">
        * {margin:0 auto 0 0px;
      padding:0;
            top: 0px;
            left: -1px;
        }
        .mainTable { height:1500;border:solid 1px red;width:1100px; margin-top:auto; margin-bottom :auto; margin-left:auto; margin-right: auto;background-color: GrayText}
        .insideTD2 { padding:10px }
        .style9
        {
            width: 35px;
            height: 28px;
        }
  </style>
</head>
<body class="style800" runat="server">
    <form id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server" />
      <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate runat="server">
    <div "margin-left:auto; margin-right: auto; margin-Bottom:auto; margin-Top:auto;">  
   
         <table cellpadding="0" cellspacing="0" class="mainTable" "margin-Bottom:auto; margin-Top:auto; margin-left:auto; margin-right: auto;">
             <tr>
<div style="margin-left:0; margin-right: 0; margin-Bottom:0; margin-Top:0;">  
   
         <table cellpadding="0" cellspacing="0" class="mainTable"  style="margin-left:0; margin-right: 0; margin-Bottom:0; margin-Top:0;">  
             <tr>

Author

Commented:
Thank You!