This my code. What I'm trying to do is to get this table at the center of the container. But instead, it aligns to the left by default when I use the "container" class, and it uses the full width when I use the "container-fluid class" for the div. I want to horizontally center the table. Can anyone help?
Material NameRate (INR)
Books7.00(per KG)Soft Plastic15.00(per KG)Hard Plastic2.00(per KG)Here is a screenshot.
I know "container-fluid" uses the full width, but I have also used "container" class only and it does not help. Please advise.
解决方案
Using this Bootstrap row/column combination works regardless of the size of your table or screen, no CSS necessary:
....table stuff....