Center elements of no specified width

This is some text of undefined width:

This is more text

This assumes text doesn't need to wrap

otherwise it will stretch full width

This is a block level element centred using margin-left:auto and margin-right:auto. Note that ie5.+ would text-align:center on a parent in order to center this block level element.

This text is centred using text-align:center

This block of short lines

is centred

Using the left:50% and left:-50% technique

.outer{
position:relative;
left:50%;
float:left;
clear:left;
margin-bottom:10px;
}
.inner{
border:1px solid #000;
padding:10px 20px;
position:relative;
left:-50%;
text-align:left;
}