【问题标题】:How to fix the size of the <html:select> combo box (contents may be larger but the combo size should be fixed)如何固定 <html:select> 组合框的大小(内容可能较大但组合大小应固定)
【发布时间】:2010-05-06 14:02:49
【问题描述】:

如何固定组合框的大小(内容可能更大,但组合大小应该固定)。现在我的组合大小根据组合中的项目进行更改。

我正在尝试获得类似于 yahoo 注册页面安全问题组合的内容: https://edit.yahoo.com/registration?.src=fpctx&.intl=in&.done=http://in.yahoo.com/

我的代码: 决定组合大小的文本

【问题讨论】:

  • 该页面上的组合具有确定框宽度的文本,所以我不明白您要做什么。

标签: html struct


【解决方案1】:
<select style="width: 100px">
  <option>Veeeeeeeeeeeeeeeery lllllllllllllloooong option</option>
</select>

甚至更好

<style>
.fixed-size  {
  width: 100px;
}
</style>

<select class="fixed-size">
  <option>Veeeeeeeeeeeeeeeery lllllllllllllloooong option</option>
</select>

【讨论】:

    【解决方案2】:

    将 css 样式设置为“width:100px”或您希望组合框的任何宽度。

    【讨论】:

      猜你喜欢
      • 2012-03-17
      • 1970-01-01
      • 1970-01-01
      • 2016-06-21
      • 1970-01-01
      • 2014-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多