增加列表框的高度在IE7 [英] increase height of listbox in IE7

查看:83
本文介绍了增加列表框的高度在IE7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个列表框:

 < ASP:列表框ID =lstProblems=服务器HEIGHT = 200像素的SelectionMode =多>< / ASP:列表框>

和我无法大小在IE中。即只挑选自己的大小。

我怎么用力给它一个特定的高度?如果它是一个CSS的解决方案,请拼出来对我来说,因为我不知道如何使用CSS工作>

非常感谢任何指导

在安德鲁的要求下面是HTML被生成方式: http://pastebin.com/HEdBg4f7


下面是围绕 lstProblems 控件的HTML的缩写版本。出于某种原因,这种控制是给予100%的高度,而不是200像素。

 <&字段集GT;
        <传奇>部分B< /传说>
        < D​​L>
            < D​​T><标签=problemTextBox>问题:其中; /标签>< / DT>
            < D​​D><输入名称=problemTextBox类型=文本ID =problemTextBox大小=50/>< / DD>
        < / DL>
        < D​​L>
            < D​​T><标签=lstProblems>的问题清单:LT; /标签>< / DT>
            < D​​D>
               <选择
                  大小=4
                  NAME =lstProblems
                  多个=多​​个
                  ID =lstProblems
                  风格=高度:100%;
              >
              < /选择>
            < / DD>
        < / DL>
        < /字段集>


解决方案

使用asp.net和IE8,我有一个类似的问题。在浏览器中显示了错误的高度列表框。该问题就走了,当我添加了一个font-size属性的ListBox控件。我将它设置在1EM。

 < ASP:列表框... FONT-SIZE =1EM...

i have a listbox:

<asp:ListBox ID="lstProblems" runat="server" height=200px SelectionMode="Multiple"></asp:ListBox>

and i am unable to size it in IE . IE just picks its own size.

how do i forcefully give it a specific height? if it is a CSS solution please spell it out for me since i do know how to work with CSS>

thanks so much for any guidance

at Andrew's request here is how the html gets generated: http://pastebin.com/HEdBg4f7


Here is an abbreviated version of the HTML around the lstProblems control. For some reason this control is given a height of 100% rather than 200px.

<fieldset>
        <legend>Section B</legend>
        <dl>
            <dt><label for="problemTextBox">Problem:</label></dt>
            <dd><input name="problemTextBox" type="text" id="problemTextBox" size="50" /></dd>  
        </dl>     
        <dl>
            <dt><label for="lstProblems">Problems List:</label></dt>
            <dd>
               <select 
                  size="4" 
                  name="lstProblems" 
                  multiple="multiple" 
                  id="lstProblems" 
                  style="height:100%;"
              >
              </select>
            </dd>            
        </dl>  
        </fieldset>

解决方案

With asp.net and IE8, I had a similar problem. The browser displayed the listbox with the wrong height. The problem went away when I added a Font-Size property to the ListBox control. I set it at 1em.

<asp:ListBox ... Font-Size="1em" ...

这篇关于增加列表框的高度在IE7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆