December 1, 201411 yr Good evening, I need some help regarding a drop down html. I am a complete novice and have limited knowledge so please try to not use jargon when replying. Thank you! I have this link drop down but when viewed the box is rather small and weedy looking so is there anything I can add/change to this to make it bigger or change the font size? If not where could I find another like this as all my searches have resulted in blanks? TIA <!----- start drop down - links open in new window -----> <form method="post" action="" name=""> <select name="select15" onChange="window.open(this.options[this.selectedIndex].value,'_top')"> <option selected>Select</option> <option>---------------------------------------------------</option> <option value="URL">Option 1 </option> </select> </form> <!----- end drop down new window ----->
December 2, 201411 yr It is possible to fully style a select box. Well that's not true entirely. But we can style a label that sits underneath a transparent select box and style that. You just need a few lines of JavaScript to get the value of the selected option and put it into the label. This is much more powerful than just using some kind of styled dropdown like Bootstrap does, this is because you will still get the native UI in smartphones that you get with a select box when it's opened. I made a pen to demonstrate this, and I'll talk about it in a little more depth in my upcoming blog post. http://codepen.io/rbrtsmith/pen/azvywm Another point of note: Do not use inline javascript. put it in an external file. you can bind events there like I do in my example. Edited December 2, 201411 yr by rbrtsmith
Create an account or sign in to comment