I am looking to center a webpart, and I was wondering if there was a way to center it within the zone it resides?

I assume I can add CSS of some sort somewhere?


you could try to enclose all your code into a div and apply some css, like this

<div id="content">
This is a DIV block that is to be centred. I don't want the text to be centred, though, just the block.

#content {
  width: 700px ;
  margin-left: auto ;
  margin-right: auto ;


| improve this answer | |

If it works to use a wiki page a quick, easy way to center web parts would be to add a table on the page and place your web part in a cell. It's easy to change the width of each column as well as using one of the default styles to hide the table.

You may not want to use a wiki page for what you are doing. Then you would have to use css to find the web part and move it around in the zone like Marco described in his answer.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.