?
Solved

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

Posted on 2003-10-24
1
Medium Priority
?
612 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
1 Comment
 
LVL 15

Accepted Solution

by:
VincentPuglia earned 375 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
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?
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

864 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