Issue with -webkit-tap-highlight-color when tapping on mobile, causing text to become invisible

Despite trying various solutions, I am still facing an issue where the text/image in the greybox section appears hidden when tapped. Can anyone please help me with this problem?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, height=device-height,  initial-scale=1.0, user-scalable=no;user-scalable=0;"/>
<style>
    *{-webkit-tap-highlight-color:#eaeaea; -tap-highlight-color:#eaeaea; -moz-tap-highlight-color:#eaeaea; -webkit-appearance:none;}
    .brands ul{ margin:0; padding:0; float:left; width:100%;}
    .brands ul li{ width:50%; list-style:none; margin:0; padding:1px; float:left; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; }

    .brands ul li div{ float:left; width:100%; position:relative;}
    .brands ul li div a{background:#f6f6f6; min-height:60px; text-align:center; display:block; height: 70px; overflow: hidden;   float:left; width:100%; position:relative; cursor:pointer; }
</style>
</head>

<body>
<div class="brands">
    <ul>
        <li><div><a>Test</a></div></li>
        <li><div><a>Test</a></div></li>
        <li><div><a>Test</a></div></li>
        <li><div><a>Test</a></div></li>
        <li><div><a>Test</a></div></li>
        <li><div><a>Test</a></div></li>
    </ul>
</div>
</body>
</html>

Answer №1

The issue has been resolved by switching to rgba color codes instead of using short color codes.

* { -webkit-tap-highlight-color:rgba(0,0,0,0.1); 
    -tap-highlight-color:rgba(0,0,0,0.1); 
    -moz-tap-highlight-color:rgba(0,0,0,0.1); 
    -webkit-appearance:none;
  }

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

Troubleshooting: Why isn't my JavaScript Array being sent to PHP file through

I am encountering an issue with transferring data from a JavaScript array, obtained from checkboxes in an HTML form, to a PHP page using AJAX. Despite successfully logging the data into the console, it appears to be lost when reaching the PHP page. My obje ...

What is the process of retrieving a dynamic array value based on checkbox selection in AngularJS?

I need help with a situation where I am trying to use Angular to get the value of a checkbox. I have a Java object on my HTML page and when a user checks an individual box, that single value should be added to my array. If the user checks 'Select All& ...

The xpath selector in Python/Selenium has unexpectedly ceased to function

Currently, I have a script designed to extract names from a crypto list on coinmarketcap. The function I utilize to obtain these names is as follows: num = 0 def print_name(): global num num = num + 1 if num == 100: exit() sleep(0. ...

Is there a way to include an edit, delete, details, and create new icon in an @html.actionLink within MVC?

This HTML code is specific to MVC and represents the formatting used: 1. @*@Html.ActionLink("Delete", "Delete", new { id=item.ActivityDepreciationTypeId })*@ 2. @*@Html.ActionLink("Details", "Details", new { id=item.ActivityDepreciationTypeId })*@ ...

What is the best way to ensure consistent display of a bootstrap 4 card structure on both mobile and desktop devices?

I'm attempting to make the bootstrap card look the same on mobile as it does on desktop, but I haven't been able to find a solution online. No snippets have been helpful! Below is a comparison of the appearance of the bootstrap v4 card: Desktop ...

How can I use one CSS child theme for three WordPress sites?

Currently, I am in the process of developing a website that spans three domains: en.mydomain.com ar.mydomain.com ur.mydomain.com All of these websites share the same theme but contain different content... I am looking to streamline the process by havin ...

Is it possible to use a TypeScript Angular (click) event with an object property as the value?

Seeking assistance in creating a dynamic error card featuring various error messages along with a retry button. Below is a snippet from my TypeScript object: errorCard: any = []; if(error) { this.errorCard.errorMessage = "Oops, please try again"; ...

Incorporate alternate text to enhance hover effects on the page

Looking to add a hover effect to images without being able to use the title attribute in the img tag? Consider using the alt text attribute for the title on hover. <img width="300" height="169" src="300x169.jpg" class="attachment-medium" alt="sometexth ...

What is the best way to keep a <div> class anchored to the bottom of an HTML page?

I am looking to incorporate a footer into my website that stays fixed at the bottom of the screen. However, I have encountered an issue: Here is what I have attempted so far: .footer { position: absolute; width: 100%; background: #0084FF; ...

The visual effect of SVG feColorMatrix filter appears distinct from that of CSS filter (sepia)

After researching on , I discovered that SVG filters, specifically using feColorMatrix, can be used to create a sepia effect. Despite following the instructions, I encountered difficulty in reproducing the desired image effect and am seeking clarification ...

Utilizing jQuery to apply a class and then continuously switch it on various elements

Here is a set of list elements: <ul> <li class="first"></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li>&l ...

Wheel of fortune - The chosen option does not align with the indicator

I am looking to create a game similar to a "Spinning Wheel" where users can select three possible outcomes and then spin the wheel. If any of the chosen three options appears when the wheel stops, the user wins. In the demo provided below, you may notice ...

Efficiently Managing Forms with SharePoint Online

Recently, I created a basic HTML/PHP form that collects input data and generates a company-approved email signature in HTML format. The form simply captures the information entered by users and displays it in the signature layout. Check out the form below ...

Is It Possible to Have Four Equally-Spaced DIVs with Variable Widths?

I am currently facing a challenge in creating a simple sub-navigation system for my website. I want to have either 3 or 4 equally spaced DIVs across the top of the content area. Despite being a common requirement, CSS does not offer straightforward solutio ...

Update the value of a JavaScript variable in an HTML template by targeting the element with a specific

Within my testFile.html HTML file, the following code is present: <div id="image-type-placeholder">marinaa</div> In my JavaScript file: const CourseImageUpload = BaseComponent.extend({ /** * @property {function} */ templat ...

Algorithm that continuously increases a given date by 3 months until it surpasses or matches the specified creation date

I am currently working with QuickBase, a platform that involves HTML. My goal is to develop a code that can take a [fixed date] (always in the past) and increment it by 3 months until the MM/YYYY exceeds or equals the MM/YYYY of the [creation date]. Once t ...

Expanding iFrame width in Drupal 7

I'm grappling with how to create a full-width page in my Drupal 7 website. This specific page contains an embedded form. Initially, there were two blocks on the page that I removed in hopes of getting the iframe to expand to fill the space. The cur ...

Utilizing the dojo.xhrget() Method to Showcase Information in the Dojogrid

Trying to showcase a dataset retrieved asynchronously from the server using the dojo.xhrget() method. The intention is to update the grid with new values each time a user interacts with the content pane, without refreshing the entire page. However, running ...

Having trouble with your WordPress child theme's formatting?

Despite researching similar issues on stackoverflow and WP Codex, I have been unable to resolve my problem. This is the second child theme I have created, with the first one functioning perfectly. However, this new theme does not inherit the formatting fro ...

Displaying Angular validations upon page load

We're currently tackling the Angular 4 form and have implemented some validation on the input field. The issue we're facing is that the validation shows up as soon as the page loads, but we actually want it to trigger when the form is submitted o ...