center the content issue in chrome browser with margin auto
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.
This is not to do with centering so it must be something to do with the positioning of your buttons. What is the html and css for those?
figured out what the issue was.
Centering was working fine.
The shaking of the content was due to the vertical scroll bar removal.
when I hit on a button, data gets refreshed. This was causing to remove vertical scroll bar and putting it back when the data came back from server. Since I set the div margin to auto it was trying to center when the scroll bar is removed and came back which was causing the shaking of content in the div.
Fixed it by setting the min-height.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)