I googled this question and searched for an hour, every one specify their own likes, but i want to know the correct code to align the div in center position.
Questions on Graphic Design Stack Exchange are expected to relate to graphic design within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
ok if you give your div an id of #centerdiv, the following css should center it
be aware that you will have to give that div a width value as well