-1

I design a simple bootstrap form in an md-col-8 column to prevent it from going full width.

In aligning the form horizontally i have tried all kinds of bootstrap 4 classes like "text-center", "justify-content-center", "mx-auto" but non works

Submit

I what the form to horizontally align at the center but it stays left aligned.

tegah
  • 5
  • 2

2 Answers2

1

first, change the class name its "col-md-8" not "md-col-8" and you can do the div center with "justify-content-md-center" or "justify-content-center" class if you add this in "row" class.

jitu thakur
  • 740
  • 3
  • 8
0

Assuming you want the block to align as a whole, you can add the offset-md-2 class so the column is offset 2 blocks, that would center the block.

gerwin
  • 834
  • 5
  • 12