【问题标题】:css bootsrap , align buttons in the div containercss bootstrap ,对齐 div 容器中的按钮
【发布时间】:2020-08-22 05:48:43
【问题描述】:

所以问题来了 我想在 div 中对齐我的按钮 这里的结果 my view

我尝试了一些 CSS,但它不起作用 现在我没有为此 div 使用任何自定义 css

这是我的刀片文件

 <td>
                          <div class="container">


                            <form method="POST" action="{{ route('users.destroy',$user->id) }}">
                              {{ csrf_field() }}
                              {{ method_field('delete') }}


                                  {{-- <!––  //With the <a> tag you are sending a get request.
                                  that's why we changed it like that because the destroy method require a DELETE request
                                  thank you stackoverflow you saved me  ––> --}}
                              <button type="submit"   class="btn btn-danger" ><i class="fa fa-trash-o" aria-hidden="true"></i>
                              </button> 
                            </form>
                           <a href="{{ route('users.show',$user->id) }}"><button  type="button" class="btn btn-primary"><i class="fa fa-info-circle" aria-hidden="true"></i></button>
                            <a href="{{ route('users.edit',$user->id) }}"> <button  type="button" class="btn btn-warning"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></button>

                            </div>
                          </td>

【问题讨论】:

  • 你能创建一个可重现的sn-p吗?它看起来像半熟的代码,可能无法正确帮助您。需要 HTML 和 CSS 代码。
  • 我不确定您是否可以将表单外部的按钮与表单内部的按钮对齐,而不是在表格/div 中引入更多列和行。
  • @Manjuboyz 我没听懂你,我是新来的
  • @KaseyChang 怎么试了,但是没用
  • 你必须展示一些代码来证明什么对你不起作用。

标签: html css twitter-bootstrap bootstrap-4 laravel-blade


【解决方案1】:

text-nowrap 类添加到表单中,它们将在一行中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-06-07
    • 2020-02-08
    • 2017-09-24
    • 1970-01-01
    • 2019-03-25
    • 1970-01-01
    • 2017-01-15
    • 2016-07-10
    相关资源
    最近更新 更多