0

I have 2 sets of identical code, my goal is to have a table align on the center of the page.

One works on Bootsnip and Codepen, but it doesn't work on my website...

I have tried to change my bootsrap template to CND, to no avail...

The page on my site is here:

http://xuzo.com/centeredleft

And the codepen is here:

http://codepen.io/Satearn/pen/JXwMLy

The code is identical for both...

The one on codepen centers in the middle, and the one on my site is aligned left.

I use this code to make it work:

.width
{width:600px;
 margin: 0 auto;
}

</style>
<div class="table-responsive width">
<table class="table">

How can the same code give different results

Bruno Vincent
  • 525
  • 1
  • 5
  • 18

3 Answers3

0

Replace col-sm-4 to col-sm-12, See image.

enter image description here

Alternative: You should remove row and col-sm-4 div, So your problem can also be solve by this.

Ismail Farooq
  • 6,309
  • 1
  • 27
  • 47
0

Change col-sm-4 to col-sm-12, or remove row and col-sm-4

FrontMonkey
  • 370
  • 2
  • 7
0

The problem was a Drupal Boostrap combination.

In order for this to work, the content item has to use display suite with a 12 column boostrap layout.

Modus Tollens
  • 5,083
  • 3
  • 38
  • 46
Bruno Vincent
  • 525
  • 1
  • 5
  • 18