473,804 Members | 2,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fixed width <select> box Internet Explorer Problem

18 New Member
I have a form with lots of select boxes with fixed widths in order to fit in with the design. The problem I have is that some of the values in the options are much wider than the select box so the text in the options is cut off at the width of the select box. In firefox etc the options just expand to the width of the values but not in IE, so if there is a long bit of text in the option, much of it is cut off.

How can I make the options appear properly in IE?

thnaks in advaced!
May 22 '08 #1
5 26328
Death Slaught
1,137 Top Contributor
That's just something that FF does and IE doesn't. You could see what this piece of could would do to your select box.

Expand|Select|Wrap|Line Numbers
  1. select {
  2.   overflow:auto;
  3. }
Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
May 22 '08 #2
pravinnweb
18 New Member
i tried wht you hv give. but doesnt solve my problem..the scene is the options in select box works properly in FF but does not expand in IE


here is the code please check in the IE
Expand|Select|Wrap|Line Numbers
  1. <select style="width: 70px; overflow:auto;" name="test">
  2. <option value="1">111111111111111111
  3. <option value="2">2222222222
  4. <option value="3">3333333333333
  5. <option value="4">444
  6. </select>
please help!. thanks in advance!
May 26 '08 #3
Death Slaught
1,137 Top Contributor
Well for one you're not ending your options properly.

Expand|Select|Wrap|Line Numbers
  1. <select>
  2.   <option>First Option</option>
  3.   <option>Second Option</option>
  4. </select>
See if ending your tags fixes the problem.

Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
May 27 '08 #4
pravinnweb
18 New Member
Well for one you're not ending your options properly.

Expand|Select|Wrap|Line Numbers
  1. <select>
  2.   <option>First Option</option>
  3.   <option>Second Option</option>
  4. </select>
See if ending your tags fixes the problem.

Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
as you suggested i tried but its not working!
give me another solutions please
thanks!
Jun 4 '08 #5
hammadtariq
1 New Member
Is that the text get truncated under panel in IE because panel is not expanding? You can create your own <select> element using YUI Library to solve width problem.

There are couple of other solutions are also available like expanding the select on mouseover. That is discussed also.
See if that help!
Jul 1 '10 #6

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

Similar topics

3
16438
by: gekoblu | last post by:
Hi!, I want to fix via javascript the combo width to a fix value. I'd like to implement a kind of ALT / TITLE function to show the entire option when the text is longer than the combo width... It's possible?!? Thanks
2
6444
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch between "display='none'" and "display=''". However the problem is that - in Internet Explorer 6 the dropdown (<select>...) always hides the menu
7
2030
by: | last post by:
I can't get IE 6 to read the values in my <SELECT..> data entry fields. Netscape 7 and Opera see them, and IE will pass the values to the database, but the javascript validation script gets a null value from the selection fields. Text inputs work just fine. Below is the form and validation script (I've added "...." to indicate additional fields in the same format in both the form and the validation) Here's the form:
4
6793
by: Glen K | last post by:
The following works in Firefox buy not in Internet Explorer: <select> <option> option1 </option> <option style="font-style: bold"> option2 </option> </select> Are there any workarounds to allow IE to show different font styles for different elements in a select list?
6
19617
by: joseph.lindley | last post by:
Forgive me for I am a bit of a web-dev novice - but I'm not doing too bad. I'm currently working with a bit of javascript to dynamically add <option>s into a select box. My code currently works fine in Internet Explorer, however in Firefox the dropdown only displays the first option in the list, and when clicked the other values aren't displayed. Here is the code;
3
14329
by: i_dvlp | last post by:
I'm trying to replicate a fancy drop-down control (MS-egads!) with form <select><option> It doesn't look like you can specity width as an attribute or define width with CSS. It looks like my choices are to use smaller fonts or choose shorter option strings. inline: I want to put a small graphic immediately to the right of the select.
7
10921
by: lambertb | last post by:
Hi, is this possible to achieve this, and how? http://img217.imageshack.us/img217/779/derrrvw2.png thanks!
4
39424
by: Man-wai Chang | last post by:
-- iTech Consulting Co., Ltd. Expert of ePOS solutions Website: http://www.itech.com.hk (IE only) Tel: (852)2325 3883 Fax: (852)2325 8288
1
2373
by: volynetsv | last post by:
Hello. I have a small problem, here's code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>iframe popup (JS)</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body>
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
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
10569
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
10325
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
10075
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
7615
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
6847
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3815
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.