Tips for Changing the Color of Highlighted Text

Seeking assistance on changing the color of selected content. I am currently using this CSS:

::selection {
        background: #ffb7b7; /* Safari */
}
::-moz-selection {
        background: #ffb7b7; /* Firefox */
}

While it somewhat works, it does not change the color of selected spaces/gaps - they remain the default blue color. Is there a solution for this issue? Feel free to visit my blog and try selecting the spaces/gaps to see the problem firsthand. Waiting eagerly for your help :)

Answer №1

There are certain sections that stand out in a deeper shade of blue, but unfortunately there isn't much you can do about it to be honest.

It appears that the ::selection pseudo element is only supported experimentally by a limited number of browsers, and it seems unlikely that it will be added to any additional ones in the near future. Visit this link for more details

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

Angular material tables are displaying borders that do not extend the full length

I am currently working on designing a visually appealing table. Due to the upcoming content in the matrix section, I am unable to make the table smaller for mobile devices. Therefore, I have added overflow:auto to enable a scroll-bar. The issue I am facin ...

Make sure the "Position Sticky" property has the same impact on nested children elements as

One method I am exploring to enhance the visibility of headers in blog posts involves utilizing position:sticky on the header. This way, header elements like H1, H2, H3, etc., can remain fixed at the top of the page regardless of scrolling. The issue arise ...

Showing the Datepicker from jQuery right in the middle of the screen

Here's the generated code as default: <div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper- clearfix ui-corner-all ui-datepicker-multi ui-datepicker-multi-2" style="width: 34em; position: absolute; left: ...

Images in assets folder are not showing up in Vue Bootstrap

I'm attempting to showcase an image similar to the example provided in this guide Below is the code I am using: <template> <b-container fluid class="p-4 bg-dark"> <b-row> <b-col> <b-img rounded="ci ...

Tips for including a close button in a slidedown panel

Having this as a functional slidedown effect: ::-webkit-scrollbar { width: 0px; /* remove scrollbar space */ background: transparent; } /* optional: show position indicator in red */ ::-webkit-scrollbar ...

Step-by-step guide on finding the span element using Python with Selenium

Can someone help me find the element below? <span class="btn btn-default" onclick="close_terms_window();" style="" xpath="1">Next</span> I've been using selenium webdriver to locate it, but I keep getting an error message: Message: no ...

Flexbox search bar positioned above a set of flexbox buttons

In an attempt to replicate Google's search bar, the following code has been developed: <head> <title>Search</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link r ...

Flex Div not reaching full height

I am facing an issue where the body is set to full height, but the containing div with a min-height of 100% is not filling up. My goal is to have the blue color fill its body container and flex align the internal divs. Visit this link for reference ht ...

Concealed ARIA Descriptors within HTML Tables to Enhance Accessibility for Screen Readers

I am currently working on a webpage where I need to implement a table with a header row that can be toggled between visible and hidden based on user configuration. The challenge is to ensure full accessibility for this table, especially in terms of navigat ...

The CSS gradient is not displaying properly, and the footer is not staying at the bottom of the page and is not resizing correctly on mobile devices

Does anyone know how to make this code responsive for mobile and other devices? Visit: Issues: The gradient text doesn't load correctly when resizing the website. The footer doesn't stick to the bottom and has display errors on mobile. The H ...

What causes the container's height to remain unchanged despite changes in the height of its image content?

When I set the height of an image to 50%, its container's height remains the same instead of automatically adjusting. HTML: <section class="img-show"> <div class="img-container"> <ul> <li cla ...

Press the "show additional content" button on the nytimes.com website using selenium

I'm experiencing difficulty scrolling through this webpage. Once I reach the bottom of the page, I am unable to locate and click on the "SHOW MORE" button using selenium. self.driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") ...

Organizing CSS rules into different groups and subgroups

Is there a way to style all elements with class X only if they also have classes A, B, or C without repeating the code? I am aware of grouping like this: A, B, C { ... } But I am looking for something more along the lines of: X, (A, B, C) { ... } ...

Different ways to style this form using only CSS

Consider the HTML code below: <form> <p> <label for="id_name">Name:</label> <input id="id_name" maxlength="40" name="name" type="text"> </p> <p> <label for="id_format">Fo ...

Dynamic navigation - main menu featuring a hyperlink

I am facing a scenario where I need to redirect the parent menu to a link instead of displaying the sub-menu. Currently, I am using Slick Menu http://slicknav.com/ It makes sense that the parent menu should not be linked to show the child menu on mobile d ...

Background Disappears Following Website Relocation

Recently, I created a PowerPoint presentation and then converted it to HTML using the conversion tool available at . The result on their website is exactly what I wanted, with a perfect layout. However, when I downloaded the zip file and uploaded the conte ...

On mobile devices, a height of 100vh exceeds the visible screen area

Struggling to cover the entire visible part of the browser window using 100vh due to issues on certain devices and mobile browsers. For example, in Safari, the URL section hides a top part, and similarly on some Android devices using Chrome. https://i.stac ...

What is the best way to deactivate a hyperlink of an <a> tag specifically for a particular child within an element?

Imagine you have a clickable container that leads to another page when clicked. However, there are elements within this container that you want to disable so that clicking on them does not activate the link. How can this be achieved? For instance, ...

Unable to get table borders to display correctly using CSS styling

Can someone lend me a hand with a CSS issue I'm facing? I want to create some CSS "classes" for tables in my form, but I can only get the borders to display correctly on one of the tables. Here is the code I've been using: table.paddedTable tabl ...

iPhones display HTML forms in a distinct manner compared to traditional desktop browsers

I have embarked on creating a basic website, designed as a private admin panel with responsive features and built using HTML5. The login page showcases the customary Username and Password form fields that I meticulously styled to meet my precise vision. U ...