473,388 Members | 1,207 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

List Box with multiple option expands <div>

Claus Mygind
571 512MB
I have a <div> which defines my menu bar. I would like for this <div> to stay fixed.

On the menu bar I have a list box.

When the list box is set for single selection, the drop down list of selections, drop below the division.

When I include the "multiple" option on the list box, the list box expands the <div> to the size of the list box's available options.

How can I prevent this from happening? Below is my HTML and css code.

Expand|Select|Wrap|Line Numbers
  1. the css code
  2.  
  3. #MenuBar {
  4.     position: fixed; 
  5.     white-space: nowrap; 
  6.     top: 0px; 
  7.     left: 1px; 
  8.     width: 99%;
  9.     background-color: #CCFFFF; 
  10.     color: black;
  11.     border: #0000FF solid 1px;
  12.     padding-left: 10px;
  13.     z-index: 150;
  14. }
  15.  
  16. the HTML code
  17.  
  18. <div id="MenuBar" nowrap="nowrap">
  19.     &nbsp;Soil Samples
  20.     &nbsp;&nbsp;Job#
  21.     <input 
  22.         type="text"
  23.         id="JOBID" 
  24.         name="JOBID" 
  25.         size="7" 
  26.         maxlength="6"
  27.     />
  28.     &nbsp;
  29.     <input 
  30.         type="button" 
  31.         value="Find Borings"
  32.         onclick="getBoringData();"
  33.     />
  34.     &nbsp;&nbsp;Select Boring#
  35.     <select 
  36.         id="BORING" 
  37.         name="BORING"
  38.         multiple="multiple"
  39.     >
  40.         <option value="all" selected>Select</option>
  41.         <option value="1"   selected>1</option>
  42.         <option value="2"   selected>2</option>
  43.         <option value="3"   selected>3</option>
  44.         <option value="4"   selected>4</option>
  45.         <option value="5"   selected>5</option>
  46.         <option value="6"   selected>6</option>
  47.         <option value="7"   selected>7</option>
  48.         <option value="8"   selected>8</option>
  49.         <option value="9"   selected>9</option>
  50.         <option value="10"  selected>10</option>
  51.         <option value="11"  selected>11</option>
  52.         <option value="12"  selected>12</option>
  53.         <option value="13"  selected>13</option>
  54.         <option value="14"  selected>14</option>
  55.     </select>
  56. </div>                                                                                      
  57.  
  58.  
  59.  
Apr 15 '10 #1

✓ answered by drhowarddrfine

Try floating the drop down.

1 3537
drhowarddrfine
7,435 Expert 4TB
Try floating the drop down.
Apr 15 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
1
by: Philo | last post by:
How do I select all <div> tags except those which contain a <table> tag somewhere within them? Example XML: <********************** sample input ***********************> <txtSectionBody>...
3
by: Paul Thompson | last post by:
When I put a <div ...> inside a <table> specification, functionality is not there. When I put the <table> inside the <div> everything works. Why is that?
2
by: Zarkas | last post by:
Hi' there Could someone tell me how to access the links for part of my page? (between a div tag) Like document.links but only for a part of the document.. been messing around with it for some...
8
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a...
6
by: Marcus Otmarsen | last post by:
Ok, the situation is as follows: I defined a <DIV> like: <div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div> This pane is...
3
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
28
by: Kent Feiler | last post by:
1. Here's some html from a W3C recommendations page. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</DIV> 2.Although I didn't think it would make any difference, I tried it with the...
2
by: Richard Maher | last post by:
Hi, I'm trying to use the Visibility Style attribute for a Div to effectively PopUp a lightweight window with some additional context-sensitive information, when a user mouses over a given...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.