Originally Posted by finoy_ako
gotcha.. sir how about if I want to center my element from top to bottom. I did try the process I did like having margin auto from top to bottom and a smaller heigth than its parent.
Top and bottom margin auto would be too simple. I'm afraid it's much more complicated than that.
It's pretty easy if you know the height of the element you want centered. My favorite method is Vertical Centering with a Float and a Clear, see link on this page
If your element is not a fixed height, it would probably take some .js to center it.