Try this
<script type="text/javascript">
function autoWidth()
{
var maxlength = 0;
var mySelect = document.getElementById('Select1');
for (var i=0; i<mySelect.options.length;i++)
{
if (mySelect[i].text.length > maxlength)
{
maxlength = mySelect[i].text.length;
}
}
mySelect.style.width = maxlength * 10;
}
</script>
And use it like this: onclick="autoWidth()"