Reputation: 964
Here is the fiddle: http://jsfiddle.net/Tb3sF/.
I've tried the code below (using and not using: display:block and different widths.)
.form {
display: block;
margin: 0 auto;
width: 700px;
}
Thanks!
Upvotes: 0
Views: 648
Reputation: 240938
It is centering with margin:0px auto
, however, since it is 700px, you are not seeing that it is centered within such a small window.
Try and lower it to something like 300px; see jsFiddle here
Alternatively, you can just use text-align:center;
jsFiddle here
Upvotes: 3
Reputation: 4433
It is working, if you stretch the fiddle window, you can confirm that. Also, if you change the width to a smaller size you can also confirm it. Try adding a border, it will help you out with the visualization.
Upvotes: 1