Link to home
Start Free TrialLog in
Avatar of Rowby Goren
Rowby GorenFlag for United States of America

asked on

Why isn't this form centered?

Hello,

I created a form that needs to be centered horizontally on the page.  But I'm not getting it quite right.  It's flush left.

Here's a link to the demo page:  Link to page with form.

Here's the css I am using unsuccessfully:
div#FormCentering {
width: 1011px;

}

form#chronoform_contactus {
width: 300px;
margin-left: auto ;
margin-right: auto ;
}

Open in new window

Looking forward to your solution...

Rowby
SOLUTION
Avatar of OmniUnlimited
OmniUnlimited
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I took a quick look at your site and it appears that your division is not getting the proper alignment. Look at your template.css file on line 286. That CSS file is getting priority over whatever CSS that you may be trying to include. In the CSS at that location the margin is being set to 0; which is causing the division not to be centered.
I usually do not try to style forms, I would personally recommend enclosing the form in a division and centering the division.

I believe that fixing the margins would solve the problem though. Let me know if that works out for you.

- Nikc
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Jagadishwor Dulal
Jagadishwor Dulal
Flag of Nepal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rowby Goren

ASKER

Hi

All of your comments and solutions were helpful not only in this form, but centering divs specifically.   So I have split the points.

And now my "form" fields are centered.

Thanks everyone for your help and insights.

Rowby