我正在使用Bootstrap 3.2以及这个材料设计插件。我向导航栏添加了一个下拉菜单。在此下拉菜单的列表项中,我有一个自定义“布局”。像这样的东西:
<li class="list-group-item">
<div class="row-picture">
<img class="circle" src="" alt="icon"></img>
</div>
<div class="row-content">
<h4 class="list-group-item-heading">Placeholder</h4>
<p class="list-group-item-text">Placeholder</p>
</div>
</li>
问题是当我单击下拉按钮时,下拉菜单会切断文本。我已经尝试了几种不同的编辑css的方法来改变宽度,比如这个和这个。但是,似乎没有一个可以解决我的问题。如何将自定义宽度设置为下拉菜单,所以它不会剪切我的文本?
编辑:这是一些相关的代码:
<head>
<meta charset="utf-8"></meta>
<meta name="viewport" content="width = device-width, initial-scale = 1"></meta>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"></link>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.1.5/css/material.min.css"></link>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.1.5/css/material-wfont.min.css"></link>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.1.5/css/ripples.min.css"></link>
<link rel="stylesheet" type="text/css" href="css/dashboard.css"></link>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
<header id="header-navigation">
<div id="nav-bar-container">
<nav id="nav-bar" class="navbar navbar-default navbar-fixed-top" role="navigation">
<div id="nav-item-container" class="container-fluid">
<div id="drop-down" class="navbar-header">
<div id="home-button" class="navbar-left">
<a class="navbar-brand" href="#">
<img alt="Brand" src=""></img>
</a>
</div>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">User Name
<span class="mdi-navigation-expand-more"></span>
</a>
<ul class="dropdown-menu list-group" id="dropdown-items" role="menu">
<li class="list-group-item">
<div class="row-picture">
<img class="circle" src="" alt="icon"></img>
</div>
<div class="row-content">
<h4 class="list-group-item-heading">Placeholder</h4>
<p class="list-group-item-text">Placeholder</p>
</div>
</li>
<li><a href="#"><span class="glyphicon glyphicon-log-out"> Logout</span></a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</div>
</header>
<script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.1.5/js/material.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.1.5/js/ripples.min.js"></script>
</body>