I am trying to center the below div. It works fine in IE and firefox. But in chrome it centers but is giving the shaking effect on clicking on other buttons in the page. setting the margin 'auto' is giving this problem. How to solve this?

Any help is appreciated. Thanks.
Below is the sample html.

<body>
<div id="test">
</div>
</body>

css:
#test {
margin-left: auto;
margin-right: auto;
width: 600px;
}