The selection choices in the HTML <select> dropdown appear oversized on Chrome browsers

There has been a recent change in Chrome versions, likely in June 2017, that is causing options in a <select> input to appear much larger than in other browsers or older versions of Chrome.

For instance, on some machines, the dropdown on this w3schools page may look like this (Chrome 60.0.3112.90, 64-bit, Windows 10):

https://i.sstatic.net/u64Wi.png

instead of the expected appearance (Firefox 55.0, 64-bit, Windows 10):

https://i.sstatic.net/4hqQe.png

Is there a workaround that can be implemented in the code to prevent this from happening (preferably a CSS solution)?

So far, some findings include:

  • A discussion on Chrome product forums confirming that many people have observed this issue, but no clear answer on whether it was intentional or not. Additionally, there have been observations that the presence of touchscreen drivers in a system might be causing this behavior.
  • Chromium bug #739196 describing the issue, but also without a clear answer on whether it's intentional or a Chromium bug
  • A few responses suggesting that padding for <option> elements in a <select> cannot be controlled via CSS by design, making it difficult or impossible to change the padding.

Answer №1

To achieve the desired appearance on various browsers, you can simply apply CSS styles to the <option> tag.

http://jsfiddle.net/Zyaqp/27/

Answer №2

In the latest version of Chrome (59), an extra padding has been introduced specifically for devices with touch interfaces, and at the moment, there is no way to deactivate this "feature".

Issue with Chrome Dropdown-menu Display

Google Chrome Help Forum

Answer №3

Encountered a similar problem while using Windows 10 and Chrome, despite not having an actual touchscreen feature.

Resolved the issue by removing and reinstalling the "Synaptics Pointing Device" (touchpad on my laptop). It seems that Chrome was mistakenly identifying the device as touch-enabled. It might be helpful to try disabling or reinstalling any devices that could be causing this misidentification.

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

The height of my row decreases when I implement the z-index for a hover effect

Hey there! I'm currently working on creating a hover effect for my cards using Bootstrap and z-index. However, I've run into an issue where the z-index works fine when I hover over the cards, but the row loses its height. I tried adding a height ...

Ways to eliminate the up and down arrow in the MUI number field

How can I remove the up and down arrow from the MUI number field? My current version is 5.3.0. Is it possible to achieve this using the sx prop? https://i.sstatic.net/fABz9.png Learn more about the sx prop here <TextField sx={{...}} id="outli ...

Change the css code to override the color of the background material

Hey there, I'm facing an issue with overriding the background color of a material element. I've tried several methods but can't seem to get it to change. After inspecting the element on the web browser, I found the CSS code that controls th ...

What is the best way to combine two PHP JSON files into one for an autocomplete feature?

I am facing a challenge with merging two JSON files into one. The issue arises as the first JSON input displays image file names with previews, while the second input only shows text file names. How can these JSON files be integrated into a single file? P ...

Attempting to generate an endlessly looping carousel of bootstrap cards using PHP

As a beginner in PHP and MySQLi, I am looking to create a basic website with looping statements in PHP to generate cards in the same row with matching size and columns without manually creating them in HTML. I am using Bootstrap, PHP, and MySQLi for this ...

Hide the Bootstrap slide menu with jQuery by clicking anywhere on the screen

Here is a Fiddle link: https://jsfiddle.net/r94dq2e4/ I have incorporated a slide-in menu from the left in my website using Twitter Bootstrap version 3. The menu appears when the navbar toggle button is clicked. This is the jQuery code responsible for ...

What is the method to display a navbar exclusively on the product category page?

I am trying to create a navbar that will only show up on the product category page of my Woocommerce website. Is there anyone who can provide me with the necessary PHP or JavaScript code to achieve this? Thank you in advance! Here is the HTML code of the ...

"HTML Parsing with Simple DOM: Dealing with Class Names Containing Spaces

I am currently utilizing PHP Simple HTML DOM to extract elements from the source code of a website (which is not my own). However, when attempting to locate a ul class named "board List", it is not being found. It seems like there may be an issue with spac ...

What is the process for customizing the user interface of modules in Apache OFBiz?

For the past month, I have been immersed in working on Apache ofbiz (17.12.07) and have developed a custom UI requirement for a client. My goal is to incorporate a side-bar (see screenshot attached below) into all ofbiz modules. To achieve this, I created ...

What is the best way to retrieve data from divs that are nested within another element using Javascript?

I am currently working on implementing a modal that will showcase specific information based on the event-card it originates from. Here is an HTML snippet showcasing an example event-card: <div class="event-card upcoming hackathon"> <d ...

AngularJS call to the web service

I am facing an issue where I do not receive any response upon clicking the button. <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js"></script> <sc ...

Tips on expanding the background beyond the boundaries of a parent container with a specific width limit

Could you please take a look at the code snippet below? I am dealing with a situation where I have a container with a fixed width, and inside that container, there are rows whose width exceeds that of the parent container. Some of these rows have a backgro ...

Creating a List with Sublists that are displayed when hovering over the parent List is a key element of effective design

Hovering over 'View Rows' should open up both New Records and Old Records <div> <li>Add Rows</li> <li>DeleteRows</li> <li>View Rows <ul> <li>View New Records</li ...

The front end button stubbornly refuses to comply and redirect to another page

I am having trouble getting my button element to redirect my page to another page. I have tried using an onclick function inside the button tag with window.location.href, as well as creating a separate function for the redirect, but nothing seems to be wor ...

Navigate to items within a content block with a set height

I have a <div> that has a fixed height and overflow-y: scroll. Inside this div, there is mostly a <p> tag containing a long text with some highlighting (spans with background-color and a numbered id attribute). Just to note, this is an HTML5 a ...

Substitute HTML data attributes

Hey everyone, I'm wondering how to change a data attribute in my code. For example, I am currently using a script for a video background, but I want to replace the video with a lighter version when viewed on a mobile device. In my JavaScript file, I h ...

What could be causing my bootstrap cards to not appear side by side?

Check out my code snippet where I've defined two Bootstrap cards: <div id="detailPanel" class="col-lg-12"> <div class="col-lg-12"> <div class="card"> <div class="col-lg-6"> <div class ...

Troubleshooting Problem with HTML Links in jQuery Accordion

After experimenting with adding a link to the HTML section of the accordion, I discovered that the link appears bold and does not open. I attempted to create a class or ID to fix this issue, but my efforts were unsuccessful. http://jsfiddle.net/q2Gm9/ ...

There appears to be an issue with the functionality of the external CSS pathway

placeholder image hereplaceholder image hereplaceholder image here I'm encountering a problem and struggling to identify the mistake in my current approach. ...

Is it possible to incorporate multiple IDs into the changeImage function for a radio

I've encountered an issue with my function that changes images based on radio button selections. It works fine for one image slider, but now I want to make it available for a second slider. The problem is that when I use the radio buttons for the seco ...