Javascript Category drop down help
-
Hey, this may not be the best place for this, but maybe someone can help me out quick. I am using the following for a drop down category menu in my archive page. All I want to do is make the width 100% in css. Is there a way to add a css class to this at all? Or, any way to change the width in pixes of the box? As it stands, it’s as wide as it needs to be. Thanks!
<script type="text/javascript"><!-- var dropdown = document.getElementById("cat"); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = "<?php echo get_option('home'); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; --></script>
- The topic ‘Javascript Category drop down help’ is closed to new replies.