gpt4 book ai didi

html - 嵌套行流体网格不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 02:43:49 25 4
gpt4 key购买 nike

我有 5 个下拉列表和右 Angular 的一列水平排列在同一行中。在下一行中,我希望有更多的下拉菜单,但我无法正确定位,因为右侧的列宽度为 500 像素;

    Example:

--------- --------- --------- --------- ---------
dropdown1 dropdown2 dropdown3 dropdown4 dropdown5 column
--------- --------- --------- --------- --------- ---------
| Ads |
| |
>I want to have a drop down here | |
--------- --------- --------- --------- | |
dropdown1 dropdown2 dropdown3 dropdown4 | |
| |
| |
| |
| |
| |
| |
| |
| |
---------
But its getting positioned here >>

这是我尝试过的:

<div class="starter-template">
<div class="row">
<div class="col-sm-12">
<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Search Job</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Search Employer</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Search Referee</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Job fair & Events</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">My RTH</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2 ad-block-right text-center" style="width:210px; height: 500px; border: thin black; border-style: dotted">
Advertisements
</div>
</div>

<!--@@@@@@@@@@@@@ NESTED ROW NOT WORKING @@@@@@@@@@@-->
<div class="row">
<div class="starter-template">
<div class="col-xs-6 col-sm-6">
<div class="">Search all jobs</div>
</div>
</div>
</div>
</div>
</div>
</div>

最佳答案

你的结构不对。首先使用row,然后在row里面用col-sm-8col-sm-4分开(这里广告列)。在 col-sm-8 中使用 row 分隔下拉列表行

<div class="starter-template">
<div class="row">
<div class="col-sm-8">

<div class="row">
<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Search Job</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Search Employer</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Search Referee</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">Job fair & Events</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>

<div class="col-sm-2">
<div class="btn-group btn-block">
<button class="col-sm-10 btn btn-sm btn-default">My RTH</button>

<button class="col-sm-2 btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

<ul class="dropdown-menu btn-block">
<li><a href="#">Reason 1</a></li>
<li><a href="#">Reason 2</a></li>
<li><a href="#">Reason 3</a></li>
<li><a href="#">Reason 4</a></li>
</ul>
</div>
</div>
</div>

<!--@@@@@@@@@@@@@ NESTED ROW NOT WORKING @@@@@@@@@@@-->
<div class="row">
<div class="starter-template">
<div class="col-xs-6 col-sm-6">
<div class="">Search all jobs</div>
</div>
</div>
</div>
</div>

<div class="col-sm-4">
<div class="col-sm-2 ad-block-right text-center" style="width:210px; height: 500px; border: thin black; border-style: dotted">
Advertisements
</div>
</div>
</div>
</div>
</div>

关于html - 嵌套行流体网格不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34200708/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com