【发布时间】:2017-07-08 01:56:19
【问题描述】:
我正在尝试让提交按钮居中页面。 我在 html 中的代码是:
<div class="container-fluid">
<div class="row" style="margin-right:0;margin-left:0">
<form method="POST"
action="https://api.instagram.com/oauth/authorize/redirect_uri=http://hanie-asemi.ir/laravel/public/instagram/test&response_type=code">
{{csrf_field()}}
<button type="submit" class="btn btn-primary submit">Submit</button>
</form>
</div>
我将提交按钮设置在桌面上,但此按钮不在移动设备的中心!我可以对移动设备中的居中按钮做什么?
【问题讨论】:
-
行后面必须跟列。此外,您可能在左右边距为 0 时弄乱了一些东西。要使按钮居中,请将其包装在 div 中,并使用 class="text-center"
-
你可以在这里摆弄吗
-
@yBrodsky 你的意思是我创建了一个带有 text-center 类的 div?margi-right 和 margin-left 在行 div 中
-
@ChandraShekhar 什么?
标签: html css twitter-bootstrap-3