Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Open Points: 75 Time: 12:25 - Sep 25, 2007  

ashwin_m17

Can we decrease the width of drop down list even if the text in it is of more size.

The condition: We have a drop list which has a large text but we do not want to increase the width of the drop list as it may affect the look & fell of the page.
If there is any Problem please let me know at ashwin.chetri@gmail.com
Here is the Example

<select style="margin-left: 1em;width: 100pt;">
 <option>first</option>
 <option>Second</option>
 <option>ThirdThirdThirdThirdThirdThirdThirdThirdThirdThird</option>
</select>

Answer Discussion
Tutorials

 

oracleofDelphi

Date:: Sep 29, 2007

Time:: 21:37

Off the top of my head, I can't think of any way to force the size of a drop down box alone. but you could use the <Table> tag with a single cell to enclose the list and that should work.

shashi.programmer

Date:: Oct 01, 2007

Time:: 00:40

.............do the following way it certainly work i have done this way

//css file
.abc{ width:in_px; font-size:in_px;}


//write this line in before header tag
<link rel="stylesheet" type="text/css" media="screen" href="name_of_your_css.css" />

<body>
<select class="abc">
<option>first</option>
<option>Second</option>
<option>ThirdThirdThirdThirdThirdThirdThirdThirdThirdThird</option>
</select>
</body>

thanks & regards
shashidhar kumar

ashwin_m17

Date:: Dec 02, 2008

Time:: 02:00

You are right this will decrease the width but will also truncate the rest of the text. Can we add a horizontal scroll bar or increase the droplist's width, only the width of the list and not the width of the box with the arrow.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Tutorials cannot be submitted until the Answer Discussion is complete.

Submit answers in the Answer Discussion area

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10279

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es