Solved

Dynamically resize combo box based on content in HTML or DHTML.

Posted on 2003-10-24
1
600 Views
Last Modified: 2007-12-19
We are using Internet Explorer 6 with an intranet based application.

I have some select elements in my web pages where the content in longer than the width of the drop down combo box itself.

Is there any way where the drop down can dynamically resize itself, specifically the text area, depending on the content, in html or dhtml.


Thanks in Advance
John
0
Comment
Question by:jtrapat1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
VincentPuglia earned 125 total points
ID: 9617704
Hi,

Like this?

<html>
<body>
<form>
<select style="width:100px" onfocus="this.style.width=''" onblur="this.style.width='100px'" >
<option selected>Table of Contents</option>
<option>1.Short Text</option>
<option>2. Not So Really Long Outrageous Text</option>
<option>3. Somewhat Ludicruous (check that spelling) But, Not So Really Long Outrageous Text</option>
</select>
</form>
</body>
</html>

Vinny
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question