473,320 Members | 2,088 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,320 software developers and data experts.

HTML <select> different width when expanded

Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png

thanks!

Sep 18 '06 #1
7 10887
la******@gmail.com wrote:
Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png
.... and why?

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Sep 18 '06 #2
On Mon, 18 Sep 2006 13:53:50 -0700, la******@gmail.com let this slip:
Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png

thanks!
Have you ever seen this kind of behaviour in an application ? I don't
think this is possible in HTML, and if it was, I imagine it to be
difficult to implement - especially in browsers that use the native
widgets to draw form elements, like IE, Konqueror or Safari.

Thomas Jollans
Sep 18 '06 #3
la******@gmail.com wrote:
Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png
WHY?

Well your could...

SELECT { width: 10em; }
SELECT OPTION { width: 20em; }

But don't expect it to work in IE!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 18 '06 #4
Hi,

I'd need this because the image I provided is just for sample. My
select contains fairly large strings, and I don't have enough space on
my page to set the width of my select wide enough to see all text. So I
was wondering if even the select element is somewhat small, it was
possible to at least expand the box to a width so we see all text in
the box that shows all elements when we click on the select.

Jonathan N. Little wrote:
la******@gmail.com wrote:
Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png

WHY?

Well your could...

SELECT { width: 10em; }
SELECT OPTION { width: 20em; }

But don't expect it to work in IE!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 18 '06 #5
la******@gmail.com wrote:
>>Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png
la******@gmail.com wrote:
I'd need this because the image I provided is just for sample. My
select contains fairly large strings, and I don't have enough space on
my page to set the width of my select wide enough to see all text. So I
was wondering if even the select element is somewhat small, it was
possible to at least expand the box to a width so we see all text in
the box that shows all elements when we click on the select.
It sounds to me like a SELECT element isn't the most appropriate choice.
Have you considered radio buttons or checkboxes, which would allow label
text that could wrap to multiple lines as necessary?
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"FAILURE IS NOT AN OPTION. It comes bundled with the software."
Sep 18 '06 #6
no, really, select is the correct choice, believe me

Darin McGrew wrote:
la******@gmail.com wrote:
>Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png

la******@gmail.com wrote:
I'd need this because the image I provided is just for sample. My
select contains fairly large strings, and I don't have enough space on
my page to set the width of my select wide enough to see all text. So I
was wondering if even the select element is somewhat small, it was
possible to at least expand the box to a width so we see all text in
the box that shows all elements when we click on the select.

It sounds to me like a SELECT element isn't the most appropriate choice.
Have you considered radio buttons or checkboxes, which would allow label
text that could wrap to multiple lines as necessary?
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"FAILURE IS NOT AN OPTION. It comes bundled with the software."
Sep 18 '06 #7
Hello,

la******@gmail.com wrote:
Darin McGrew wrote:
>la******@gmail.com wrote:
>>Hi, is this possible to achieve this, and how?
http://img217.imageshack.us/img217/779/derrrvw2.png

la******@gmail.com wrote:
I'd need this because the image I provided is just for sample. My
select contains fairly large strings, and I don't have enough space on
my page to set the width of my select wide enough to see all text.
You need a larger monitor. ;)
So I
was wondering if even the select element is somewhat small, it was
possible to at least expand the box to a width so we see all text in
the box that shows all elements when we click on the select.
But the text will be cropped, when the SELECT is not expanded, and the user
has to click on it, in order to read it - not a good idea.
>It sounds to me like a SELECT element isn't the most appropriate choice.
Have you considered radio buttons or checkboxes, which would allow label
text that could wrap to multiple lines as necessary?

no, really, select is the correct choice, believe me
Unless you provide more context, we have to guess and rely on our
experiences. And this experience tells us that in 99.9% the question is
not "How do I implement XYZ?", but "How do I construct a document so I
don't have to do XYZ?".

To me, this sounds like your layout is much too rigid, and you are suffering
from the consequences of this approach. You can't control how large the
browser window, font size, ... is anyway. If there is enough space to have
the (wide) select and submit button side-by-side, fine. When there is not
enough horizontal space, nobody gets hurt, if the submit button is placed
below the select and the user has to scroll a bit in order to see the
complete document (which is less efford than clicking on the select
control(s) in order to see which option is active).
HTH

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Sep 19 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Salve Håkedal | last post by:
When I select Februar here and sends, selection returns to Januar. I know why: no option is marked selected... But can php get this right in an easy way? <html><head><title>Part of a bigger...
2
by: Mad Scientist Jr | last post by:
I'm trying to get javascipt select all items in a HTML form <SELECT> control and submit the form to an asp.net page. For some reason when the link is clicked, you can see the items all get...
1
by: Mariusz | last post by:
Hi does anyone know an easy way to define object <select> in that way when clicking on it works as right alt is used. In other words - I need to rebuild select than when I click on first option...
6
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this...
1
by: Knut-Frode Dagestad | last post by:
I have a <selectlist in some html code with hundreds of options. Is it possible to use javascript to jump to the next/previous item in the list? Knut-Frode
4
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
5
by: TomT | last post by:
Hello, I'd like to create several home pages, all with the same HTML code but different CSS settings. I would then allow the visitor to choose which home page to view. This is pretty easy if I...
7
by: Zhang Weiwu | last post by:
Dear all How does javascript realiablily tell if a variable is a reference to an HTML Element "<select>", without causing browser to pop up error message? if (variable.constructor ==...
4
by: mark4asp | last post by:
I have an element, report which contains tags which have been transformed. E.g. <pis &lt;p&gt <myXml> <report>This text has html tags in it.&lt;p&gt which but <has been changed to &lt;&gt</report>...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.