rnv Posted October 24, 2012 Share Posted October 24, 2012 Hi, I can simply use the following tag to horizontally align a table to center: <table align="center" class="centertable"> I would like to use the CSS to do the same but somehow I cannot make it work. here is how i tried. Will appreciate help. .centertable {align:center;} with best regards,rnv Link to comment Share on other sites More sharing options...
thescientist Posted October 24, 2012 Share Posted October 24, 2012 .centertable{ width: 500px; //need to give the element some sort of width margin: 0px auto; //how to center a block level element, given that you have given it a width} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now