I am working with a dashboard, containing panels. Each panel has a limited width as the dashboard contains quite a lot of information.
Each panel contains a table listing certain users and an Angular dropdown selector to add more.
When selecting a user whose name is longer than the width of the box, it expands, pushing both the box and the adjacent button out of the panel, even sometimes overlapping the one next to it.
Here's how the element is written in the markup :
<td>
<select chosen style="font-size: 75%" options="users" id="selectedTechnicianUser" ng-model="selectedUser" ng-change="addUser(selectedUser)" class="form-control" search-contains="true" display-selected-options="false" ng-options="<query...>">
</select>
</td>
I would like the name to be cut when needed, ideally by showing something like [Jonathan LEI...]
in the box or just, as I had attempted, reducing the size of the font.
Any help is greatly appreciated.
答案 0 :(得分:0)
经过一段时间的研究并尝试了不同的选择,这是我所学到的:
<select>
标记选项并不有用:标记会创建一个包含多个<div>
的{{1}}其他<div>
标签。它们使用bower_components文件中定义的 CSS 样式。width
可以传递动态值(比如width: 100%;
AND !important
选项,覆盖任何其他值相同的属性。text-overflow: ellipsis;
正是这种情况所需要的,问题就在于把它放在哪里以便它能够完成它的工作。