pls help me to set the width of a combo in IE.....is there any way to fixe the width in IE....


In mozilla ,i fixed it using style="width:100px";

thankzzzzzzz

Recommended Answers

All 10 Replies

The same code should work for IE as well.
I tried the following code in IE and it's working fine.
<select size="1" style="width:100px">
<option>1</option>
<option>2</option>
</select>

wht version IE u r using with...
am using IE 6..........
its not working in IE 6 ..thts quiet sure

thankzzzzzz..

is there any other way?????

Hi,
its working fine in IE and opera, just check again.

<select size="1" style="width:50px">
<option>1</option>
<option>2</option>
</select>
<div style="width:50px;background-color:red">
hi
</div>

above code will show that red div and combo is of same width, check if they are of same width or not,
may be you are missing some thing.

sorry my dear friend...
i am not getting any result in IE

my code is :::


<html:select property="statename" styleClass="LABEL" onchange="getStateDetails();" size="1" style="width:50px">
<html:option value="" key="-----ALL-----"></html:option>
<html:options collection="stateList" labelProperty="name" property="stateId"></html:options>
</html:select>

i have done wht u said...right????
any probs with above code...


NB:::again ...am using IE 6[/B]

thankzzzzzzzz

hi
paste my code as it is in to a blank .html file and run it in IE see the result, if its working means there is a problem in your code.

still not working.......

where r u testing in ..
which version are u using with...
?????

Hi,
I am testing in IE 6 and opera.
try to test in other machine and other browser also.
try to test just my code without adding any other tag or code. if you are adding post code here.

i changed ur code to:::


<select size="1" style="width:50px">
<option>111111111111111111111111</option>
<option>211111111111111111111111111</option>
</select>
<div style="width:50px;background-color:red">
hi
</div>


and checked in IE 6......i can see only 3 o4 4 1's...the remaining portion is trimmed.......
but in fireFox we can see as a whole

yah it means its working now.

.i can see only 3 o4 4 1's...the remaining portion is trimmed.......

thats bcoz you have fixed the width in IE.

but in fireFox we can see as a whole

coz different browser behaves differently !!!

Have a nice time !!!

u r great....!!!!!!!!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.