Default cursor for Internet Explorer: automatic

I have a container div that holds all of my website's content. I want this container to change the cursor to a pointer when clicked on, but I don't want the elements inside the container to inherit this cursor style:

https://i.sstatic.net/8joJo.png

To achieve this, I set the container to have cursor: pointer, and the inner content to have cursor: auto. This solution works well in most browsers, however, it fails in Internet Explorer (specifically IE11). The problem in IE is that setting cursor: auto within an element does not reset the cursor to its default state, but rather inherits the parent's cursor style (refer to cursor:auto behaviour in IE 8 and 9). Therefore, in IE, everything appears as clickable due to the constant display of the pointer cursor.

The suggested workaround from the linked answer involves setting the inner content area to have cursor: default to convert the pointer cursor back to a regular one. However, this method results in text displaying using the default cursor instead of the expected text selector. Is there a simpler solution to this issue other than manually specifying each individual element within the content area to restore their default cursors?

.wrapper {
    cursor: pointer;
}

.content {
    cursor: default;
}

.content p, .content h1, .content h2.... {
    cursor: text;
}

.content a {
    cursor: pointer;
}

etc.....

Answer №1

To update your design layout, simply follow these steps. Check out the sample on https://jsfiddle.net/CLEAN_SMITH/3pd8rsyZ/12/

HTML

<div class="container">
  <a href="#">
    <div class="left-pane">

    </div>
  </a>
  <div class="center-pane">

  </div>
  <a href="#">
    <div class="right-pane">

    </div>
  </a>
</div>

CSS

.container {
  width: 100%;
  height: 100vh;
}

.left-pane,
.right-pane {
  width: 150px;
  height: 100%;
  float: left;
  background-color: blue;
}

.center-pane {
  width: calc(100% - 300px);
  height: 100%;
  float: left;
  background-color: gray;
}

Answer №2

To apply a default cursor to all child elements of the .content class, you can use the following CSS selector:

.content > * {
    cursor: default;
}

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

AngularJS resource failing to generate correct URL structure

I'm encountering an issue with AngularJS resources. The resource I have is structured as follows: loginModule.service('TestResource', function ($resource, $location) { var $scope = this; $scope.resource = $resource(window.location. ...

Error handling with JSON in Parse.com causes compatibility issues in Express js 4

I need help figuring out why the data I send in a POST call to an Express JS server hosted on Parse.com is not being received properly. This is how I send the data: var data = new Array(); data["firstName"] = firstName; data["lastName"] = las ...

Each column has its own scroll bar, making use of 100% of the available space within a container that is 100%

I am attempting to create 3 columns, each with its own scroll bar, while also taking up 100% of the available space. However, I am facing issues where there is either no scroll bar present or the columns are not occupying 100% of the available space. It ...

Unable to make anchor tag inside button effectively collapse another div

My Nuxt 2 SSR + Bootstrap 5 application includes the following code snippet: <button v-for="file of orderProduct.files" class="collapsed son-collapse" type="button" data-bs-toggle=&quo ...

Delay in displaying Promise API call in NextJS

Currently, I am encountering an issue while making calls to an API function that I have already set up and confirmed to work flawlessly in other projects. Interestingly, I have utilized the same backend API calling method in another project as well as with ...

Issues encountered with Nextjs 13.4 and Next-Auth 4.2 regarding the signIn("credentials", { }); functionality not functioning as expected

When using next-auth credentials in my current project, I encountered an issue with the signIn() function from next-auth/react. It appears that the redirection to the admin page persists regardless of whether the login details are correct or not. {error: n ...

Data within AngularJS is bound when receiving an Ajax response in HTML

In my current project, I am using Python/Django for the backend with a complex structure of forms. The frontend consists of an Angular controller that makes requests to fetch a suitable form. While working on this, I came across a Django-Angular package th ...

Is there a more efficient way to query a GraphQl endpoint in node js without resorting to messy string manipulation?

Searching for ways to query a GraphQl endpoint has led me to various solutions that involve string building, all of which seem clunky. Here are some references: querying graphql with node https://www.npmjs.com/package/graphql-request Currently, the cod ...

Ensure that the user's browser cache is cleared after deploying a new version on Firebase hosting

Utilizing create-react-app for my front end scripts and firebase hosting for deployment has been smooth overall. However, I've encountered an issue where updates to CSS and HTML files don't always reflect on the domain until I manually clear the ...

PHP version 7.2.1 is throwing an error indicating an undefined index for the file_upload

Encountering an error message: Notice: Undefined index: file_upload in C:\MAMP\htdocs\basic_files\upload.php on line 3 Each time I attempt to upload a file using the form. While many attribute this issue to problems with enctype or ...

Can you please explain the process of retrieving the value of an item from a drop-down menu using JavaScript?

I am currently developing a basic tax calculator that requires retrieving the value of an element from a drop-down menu (specifically, the chosen state) and then adding the income tax rate for that state to a variable for future calculations. Below is the ...

Having trouble adjusting the top menu on my Shopify theme to fit on a single line

Check out this online store: On the site, you'll notice the menu at the top with options like Home and Chain Saw Safety. Despite my best efforts to adjust the CSS, I can't seem to get it all to fit on one line. I've played around with the ...

WooCommerce Checkout and My Account Edit Address now feature dynamic selectable fields for improved customization options

After finding a solution on Stack Overflow to show sub Areas dropdown based on the selected city in WooCommerce checkout, I customized the code for my specific requirements: function cities_areas_settings() { $text_domain = 'woocommerce'; ...

Uncover each image individually

I have a task in React where I am displaying a list of images using the map method, and I want to reveal each image one by one after a delay. The images I am working with can be seen here and I need them to be revealed sequentially. The following code sni ...

reconfigure keyboard shortcuts in web browser

In the popular web browser Google Chrome, users can quickly jump to the next tab by pressing CTRL + TAB. Is there a way to change or disable this shortcut? The provided code snippet does not seem to work as intended. $(document).keydown(function(e){ ...

Is there a way to use Laravel to send an asynchronous post request for managing likes?

Currently, I am managing likes in the following way: class LikeController extends Controller { public function like(Post $post) { $attributes = [ ['user_id', '=', auth()->user()-&g ...

Transfer elements from collections employing multer

Data Payload Example:- education[0][university]: jru education[0][degree]: mca education[0][specialization]: computer application education[0][certificate_pdf_url]: (binary) education[0][degree_type]: Teaching Degree education[0][years_of_study]: [&q ...

Stop the container from growing in height due to column expansion

I'm facing an issue with my Vuetify two-column layout. The left column contains media with varying aspect ratios, while the right column houses a playlist. As the playlist grows in length, it extends the container, leaving empty space below the media. ...

methods for retrieving nested JSON data from an API endpoint

My data has been exported in JSON format { "count":79, "stories":{ "23658975":{ "title":"NOMINATIVO", "description":"BUSDRAGHI PIERGIORGIO", "updated_at":"2013-06-16T18:55:56+02:00", "created_at":"2013-06-16T18:39:06+02:00", "du ...

Error: The function getOrders is not defined in the customerFactory

Throughout my third attempt at learning AngularJS, I've hit a roadblock. I could really use some assistance as I keep encountering the error TypeError: customerFactory.getOrders is not a function. Despite thoroughly checking for typos, I haven't ...