0

I have done a good bit of searching and even tried modifing the bootstrap css file for .btn and <pre> but I cannot figure out how to get this thing centered

<pre style="margin: 0 auto 10px;max-:36px;">
Currentpassword
<button type="button" class="btn btn-warning" style="float: right;margin: 0 auto;">Button</button>
</pre>

I'm sure it's something simple. I posted an image below, thank you to anyone that responds!

screenshot

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

Assuming you mean horizontally centered, you can add text-align:center to the pre tag.

<pre style="text-align: center">
    <button class="btn">Button</button>
</pre>
gurch101
  • 2,064
  • 1
  • 18
  • 18
  • I tested this and that centers the text however if you see the picture I have the button seems to be offset from vertical alignment. It doesn't do this when I do not have a alignment style on the button however when I align my button to the right it off center. – user2480445 Jun 13 '13 at 05:11