Displaying various select choices on Android / iOS web browser

I need to display multiple options listed one below the other, similar to how desktop browsers show them.

<select size="10" name="selectionList">
  <option value="5">Sparrow</option>
  <option value="18">Snowbunting</option>
  <option value="13">Purple-crowned Fairywren</option>
  <option value="19">Eagle</option>
  <option value="16">Hawk</option>
</select>

In standard desktop web browsers, these items are neatly displayed in a list with the option to scroll. However, when viewed on Android and iOS browsers, only the selected item is shown, leaving wasted space. When an attempt is made to select something, an options menu dialog appears.

Although I have specified size="10", mobile browsers do not display up to 10 items at a time. While I understand the reason behind this implementation, I am looking for a simple CSS solution to change this default behavior.

Is there a way to make mobile browsers render my select options like desktop ones, without triggering the options menu dialog?

Answer №1

Experimenting with Android 2.3.3 SDK at the moment - when applying a border to the CSS, such as: style="border: solid 1px #999999", it causes the select box to display in full size. However, strangely, the selected options are not visible for some unknown reason. The browser seems to be quite unreliable in this case.

Answer №2

In my opinion, utilizing multiple checkboxes would be more suitable for this task than using a multiple select option. Additionally, if the list is long, implementing a search input at the top to allow users to filter the list dynamically could greatly enhance user experience.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue in XCode 7: Warning about incorrectly positioned views in Storyboard

A UIView has been added on the storyboard with constraints set to top, left, bottom, and right as indicated below. The image reveals that the orange border signifies a misplacement of the view. https://i.sstatic.net/elzVH.png https://i.sstatic.net/HFwBY ...

Issue with STS 4.7: CSS Autocomplete feature not functioning properly in Spring Boot project

Currently working on a web application using Spring Boot and Thymeleaf as the template engine. I've stored all my CSS files in the "resource/static/css" directory. However, when attempting to edit an HTML file, STS does not provide suggestions for CSS ...

jQuery smoothly sliding downward from the top to the bottom

http://jsfiddle.net/Hx65Q/3/ Is there a way to make the slider open from the top instead of the left side? $("button" ).click(function() { $('.login').toggle('slide', { duration: 1000, easing: 'easeOutBounce', }); ...

(jquery) Show or Hide One Dropdown Element Singularly

I'm currently working on creating a mobile side navbar that features dropdowns with additional links. One issue I'm facing is trying to set it up so that when a link in the navigation is clicked, only the corresponding dropdown activates. At the ...

adjust highcharts chart size to fit screen width

Has anyone experienced issues with setting an explicit width of 400px on a chart? I am facing difficulties as the chart gets cut off instead of scaling down to that size. My main concern is having it resized properly for an iPhone mobile site. Can anyone ...

Exploring the elements of an array list

In my Java code, I have an ArrayList containing approximately 242 elements. It looks something like this: ArrayList<String> AL=new ArrayList<>(); AL.add("Apple"); AL.add("Banana"); AL.add("BArbie"); AL.add("El ...

Can the class instance be utilized within the constructor?

I often wonder if it's possible to utilize the current instance of a class within its constructor. One scenario I've come across is with a BroadcastReceiver that registers and unregisters itself within its own constructor. Is this considered goo ...

Tips for adding a string variable to a JQuery HTML element attribute

Hi there, I've been working on a JQuery code to append data to a div element and it's been successful so far. Here is the code: $('#conversation').append('<div id="receiver"><p><b>' + username + ':< ...

API version 28 (Pie) is mysteriously absent from the Target Android Version list in my visual studio 2013

Hey there, I'm currently working with visual studio 2013 and have Xamarin integrated in it. After updating the Xamarin Tools through Android SDK Manager, I noticed that API 28 is installed but isn't appearing in the Dropdown menu for selecting t ...

Posting on Facebook using an iOS device

I'm having an issue with the Facebook share button appearing disabled in my application. I followed the instructions provided at this link: https://developers.facebook.com/docs/sharing/ios#videos Despite trying multiple techniques, I have not been ...

Different ways to create audio using GWT

Looking for ways to incorporate audio into your GWT app? I am considering creating a simple game, but it seems like there hasn't been much progress on direct audio support within GWT. This is likely due to the lack of underlying browser support, but I ...

Guide to repositioning elements and fixing the functionality of the hamburger button: [ HTML & Bootstrap ]

Looking for help with creating a navbar for a website using HTML and Bootstrap. Need to move the header and link to the ends of the navbar and ensure that the hamburger button displays correctly on different screen sizes. Here's how it looks on deskt ...

Show only the portion of the image where the cursor is currently hovering

Information in advance: You can check out the current code or view the live demo (hover image functionality not included) at . The concept: I would like to have it so that when I hover my cursor (displayed as a black circle) over the image, only the s ...

iOS - Troubleshooting UIWebView not refreshing properly when connected to slow or spotty networks

Hello everyone, I am a newcomer to the iOS realm so please bear with me as I navigate through this new world. I recently created a webview to convert a web app into a native iOS app, and it is currently available on the app store. However, some users have ...

Utilizing DisposeBags with RxSwift in UIViewController

I recently started working with the RxSwift library. I have been using disposables in my ViewController and storing them in a DisposeBag. Should I dispose of the DisposeBag in the viewDidAppear method or in the deinit method of the controller? Which appro ...

Troubleshooting "rubber-banding" problems with iOS Swift's `heightForRowAtIndexPath`

I am facing an issue with the variable cell heights in my UITableView that are calculated based on the text size. When I return a static number, like 72.0, everything works fine but the text gets cut off. However, if I include any sort of calculation, fo ...

Instructions on how to properly align a Youtube video using the react-youtube package

I'm currently encountering an issue with my YouTube video display. I have managed to make it responsive, but it is stuck on the left side of the screen and I am unsure how to center it properly. I tried adjusting the padding, but it didn't work a ...

Is there a way to retrieve a numerical value from within two specific elements when web scraping?

I am new to web scraping and looking to extract the numbers located between the strong tags. Currently, I am using Python 3.8 along with BeautifulSoup for this task. <li class="price-current"> <span class="price-current-label"> </s ...

Is there a way to align both JSX elements in a single row without having one overlap the other?

Is there a way to showcase both conditions side by side on the same line? If Condition 1 is met, display the images; if Condition 2 is met, show the video. import React, { useState } from "react"; import { Card } from "react-bootstrap" ...

There is a way to format an NSString without including spaces in a UILabel

How can I format a word in NSString to appear on a UILabel with added white spaces corresponding to the length of the word above? Alternatively, is there a way to achieve this formatting using NSAttributesString? ...