DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   width of a combo (http://www.daniweb.com/forums/thread112780.html)

ajithraj Mar 8th, 2008 12:10 am
width of a combo
 
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

nagoon97 Mar 12th, 2008 11:27 am
Re: width of a combo
 
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>

ajithraj Mar 13th, 2008 12:40 am
Re: width of a combo
 
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?????

DangerDev Mar 13th, 2008 1:02 am
Re: width of a combo
 
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.

ajithraj Mar 13th, 2008 1:49 am
Re: width of a combo
 
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

DangerDev Mar 13th, 2008 1:55 am
Re: width of a combo
 
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.

ajithraj Mar 13th, 2008 2:02 am
Re: width of a combo
 
still not working.......

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

DangerDev Mar 13th, 2008 2:24 am
Re: width of a combo
 
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.

ajithraj Mar 13th, 2008 2:43 am
Re: width of a combo
 
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

DangerDev Mar 13th, 2008 3:11 am
Re: width of a combo
 
yah it means its working now.

Quote:

.i can see only 3 o4 4 1's...the remaining portion is trimmed.......
thats bcoz you have fixed the width in IE.

Quote:

but in fireFox we can see as a whole

coz different browser behaves differently !!!

Have a nice time !!!


All times are GMT -4. The time now is 11:15 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC