Searching for a method to center text in a div or whatever with just css which also works in IE5, 6, & 7

Set the line-height equal to div height

Example:


.whatever{
  width:100px;
  height:100px;
  line-height:100px;
}