How can I get the image to position center, horizontally, on top of the form?

Hi, I'm using asp.net 3.5
how can I position this img to appear center, before the table below it.  Inside of the form, thank you
<body>
    <div align="left" style="width:880px; border-style: solid; border-width: medium; padding: 20px 20px 2in 20px; margin: 0in 2in 0in 2in; background-color: #FFFFFF;">
    <form id="frmManageAccounts" runat="server" style="background-image: url('../../Images/adapt_bg.jpg'); background-repeat: repeat">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <img id="logo" alt="Adapt Logo" src="../images/AdaptLogo.jpg" />
    <table id="tblNewAccount"  width="880px">
        <tbody>
            <tr>

Open in new window

lapuccaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Salih MaouiSenior Software DeveloperCommented:
try

  margin-left: auto;
  margin-right: auto;
0
Gurvinder Pal SinghCommented:
if the size of the image is supposed to be fixed then (since the parent div has a fixed size 880px)

img
{
   width:60%;
   margin-left:20%;
}

idea is to give a width to the image and then depending upon the width give the appropriate left margin to it, so that width + 2 (left margin) = 100%

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
elliottbenzleCommented:
try adding the code below to your image

 <div align="left" style="width:880px; border-style: solid; border-width: medium; padding: 20px 20px 2in 20px; margin: 0in 2in 0in 2in; background-color: #FFFFFF;">
    <form id="frmManageAccounts" runat="server" style="background-image: url('../../Images/adapt_bg.jpg'); background-repeat: repeat">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <img id="logo" alt="Adapt Logo" src="../images/AdaptLogo.jpg" style="margin-left:auto; margin-right:auto;" />
    <table id="tblNewAccount"  width="880px">
        <tbody>
            <tr>
0
lapuccaAuthor Commented:
Thanks everyone.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.