If you have a container (ie a fixed size frame) and you want to center that container in the page, the traditional, old fashioned way was to use a table or the < center > tag. With CSS, you simple use this in your container class:
margin: 0px auto;
You can always use a top or bottom padding if you wish to give some space to your container class, but this will keep it centered on the page nicely.
Discussion
No comments for “Centering with CSS”
Post a comment
You must be logged in to post a comment.