Boostrap 4下拉开启在错误的位置

时间:2018-02-25 15:33:08

标签: laravel bootstrap-4 dropdown

enter image description here

嗨,

我正在使用laravael,我正在尝试将文件 a .blade.php的引导下拉列表呈现到文件 b .blade.php。

下拉列表呈现但位置错误。见附图。任何帮助将不胜感激。

这是我的代码:

  • 档案a.blade.php

       <ul class="nav navbar-nav ml-auto main-search justify-content-end">
            <div class="input-group main-seach-field">
                <form action="{{route('frontend.search')}}" method="GET" class="search-form">
                    <input type="text" name="search" class="form-control"
                           placeholder=" &#xF002; {{__('polls.frontend.search-placeholder')}}"
                           style="font-family: Roboto, FontAwesome"/>
                          <div class="input-group toggle-search pr-1">
                            <div class="dropdown-toggle" href="" id="poll-search-modal" data-toggle="dropdown" aria-haspopup="true" data-target="#poll-search-modal"
                           aria-expanded="false">
                        </div>
                     </div>
                    <input type="submit" value="{{__('polls.frontend.search.main-search')}}"  class="btn-search " />
                </form>
            </div>
        </ul>     
    
  • 档案a.blade.php

    <div class="nav-item dropdown  dropdown-advance-search" id="poll-search-modal">     
    <div class="dropdown-menu dropdown-menu-advance-search dropdown-menu-right" aria-labelledby="poll-search-modal">
             content here[![enter image description here][1]][1]
    </div>
    </div>
    

1 个答案:

答案 0 :(得分:0)

这不是laravel问题,而是布局,尝试使用样式

分别设置菜单位置