Solved

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

Posted on 2003-10-24
1
582 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 125 total points
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now