increase height of listbox in IE7

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>

Answers:

Answer

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" ...
Answer

Did you explicitly declared height using CSS?

#lstProblems{height:200px !important; display:inline-block;}

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.