Wrapping a DIV around content and keeping it centered
===

I have a problem concerning CSS and HTML. 

I'm trying to wrap a DIV around another element (an UL in this case) and having it wrap around it and at the same time keeping both centered. As an added bonus I can't set a specific width since the width of the content inside the wrapping DIV have to be dynamic (since this is basically a template). 

I've tried floating, and that works as far as wrapping goes, but then the thing ends up either to the right or to the left.

I'm going a bit crazy over this, and google is no help!

Thanks in advance!