You can use div {display:table;margin:0 auto;}. display:table hugs its contents, margin:0 auto centers it in its container. There are other methods, but this is the easiest. IE8+
As Ron said display:table will do what you want as widthless tables can be centred with margin:auto unlike widthless divs.
If you need less that IE8 support (which I doubt as bootstrap doesn’t really support IE7 IIRC) then you can use display:inline-block instead. Although IE7 and under don’t understand inline-block natively on block elements they can be fixed with a simple hack as follows.
.el{
display:inline-block;
*display:inline;/* ie7 and under inline-block hack */
*zoom:1.0;/* " " */
}
You would then just need text-align:center on the parent of that div as inline-block elements are then centred just like normal text.