If you can specify the height of the box, you can use margin-top: -[height / 2]px
(fill in [height / 2]
and note that most browsers will round fractional pixels up at 100% zoom).
If you can specify the height of its parent, you can do something like this:
parent {
height: [height]px;
}
child {
/* Make the element part of the inline flow, as vertical-align isn't supported on block elements */
display: -moz-inline-box; /* Old Firefox doesn't support inline-block */
display: inline-block;
/* IE < 8 doesn't support inline-block on native block-level elements */
*display: inline;
*zoom: 1;
/* The interesting bit */
line-height: [height]px;
vertical-align: middle;
}
If the content of the child is expected to wrap onto multiple lines, you can wrap it in a sub-child that resets the line-height
.