473,808 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List Box with multiple option expands <div>

Claus Mygind
571 Contributor
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
1 3555
drhowarddrfine
7,435 Recognized Expert Expert
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
3407
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 <foo/>) From XHTML specification:
1
2511
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> <div> <span>
3
84619
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
2531
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 hours without luck. thanks, -Mic
8
14470
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 page, there is a huge gap (like 3/8 inch or 25 px) between them. This is driving me bananas. What the hey am I missing? dh ------------------------------------------------ Dan Hansen ------------------------------------------------
6
37161
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 used to move an object around on the web page by a javascript. As long as I define no further <div> pane everything works fine.
3
3816
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" onclick="__doPostBack('SitesRadioButtonList_3','')" language="javascript" />
28
5383
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 </p>s included as well. <P>aaaaaaaaa</p><DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</p></DIV>
2
3390
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 field(s). The popping-up seems to work just fine; it's the tearing down that's giving me grief. If I stick a onmouseout event on the same input field that caused the onmouseover/pop-up, it starts to flicker 'cos the <divis placed for esthetically...
8
10051
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 editor. A fellow member of the PCG has helped me by creating a bit of Javascript to emulate the scrolling and using Google I've now gotten it into a state where it almost passes the W3C Markup Validation Service. However, the one error, Error Line 166,...
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10631
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10114
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.