What could be causing the bottom shadow of a row to disappear when the row is hovered over?

I've been using the datatable and noticed that when I hover over a row, the bottom shadow doesn't appear. Why is only the right and left shadows displayed?

  table.dataTable tbody tr:hover {
                    
                   background-color: #fbfbfb; box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.5); cursor: pointer; 
                   border-bottom:double;
                }

view the image here for reference

Answer №1

One way to enhance the appearance of your table is by adjusting the positioning of the rows. You can set the rows to relative, change the display to block, and modify the z-index when hovering over a row to bring it to the forefront. See the example below:

table tbody tr:hover {
background-color:#13326b;
color:#ffffff;
text-shadow: 1px 2px #000000;
box-shadow: 0px 0px 10px #ff0000;
-webkit-box-shadow: 0px 0px 10px #ff0000;
-moz-box-shadow: 0px 0px 10px #ff0000;
z-index:100;
}
td, th { padding-left: 16px; min-width: 170px;  text-align: left; }
table tbody tr , table tbody td{
    height:100px;
}
tr{
  display: block;
  position:relative;
  background-color:#fff;
}

Answer №2

click here for image

 table.dataTable { 
  box-sizing: border-box; 
}

 table.dataTable td, th { 
  width:100%
}

  table.dataTable tr {
  display: block; 

}
   table.dataTable tr:hover {     
  position: relative; 
  background-color: orange;  
  cursor: pointer; 
  box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.5); 
  cursor: pointer; 
}


applying the above code gave me the shadow effect, but it affected the user interface negatively.

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

Iterate through a JavaScript object while preserving the key along with its corresponding value

var info = { 2016-09-24: { 0: {amount: 200, id: 2}, 1: {...} }, 2016-09-25: { 0: {amount: 500, id: 8}, 1: {...} } } In order to display the data stored in the object above, I want to create a view that looks like this: "**" will r ...

What is the best way to create a responsive div containing multiple images?

I am working on a slider and my approach is to create a div and insert 4 images inside it. The images will be stacked one above the other using position: absolute, with a width of 1013px, max-width of 100%, and height set to auto for responsiveness. The is ...

Validate Email and Phone Number using Javascript

How can I create a Javascript function to validate an HTML form? Currently, my form validation only checks if a field is empty. I want to enhance it to also validate the email format and ensure the phone number is numeric. Currently, the form displays a po ...

Strategies for enhancing the performance of this arbitrary playlist HTML5 audio script

<script type="text/javascript"> function random_music(){ var myrandom=Math.round(Math.random()*4); var musicurl='http://dummy.xy/dummy.mp3'; if (myrandom==0){musicurl='http://path_to.mp3';} else if (myrandom= ...

Guide to horizontally aligning a div with a dynamic width in the center

After extensive research, I discovered that setting a width allows you to center a div using margin: 0 auto along with left: 0;, right: 0, and position: absolute. However, all the examples I found had a specified width. In my specific case, I need to cent ...

WebSocket Binary in Chrome version 16

I'm encountering issues while setting up a WebSocket server in node.js. After seeking help on stackoverflow, I managed to find a piece of code to use for the server. Here is the current server code: var net = require("net"), crypto = require("crypto" ...

Utilize Jquery to dynamically update form input in real time based on checkbox selections

I am working on a form that requires real-time calculation of GST (Goods and Services Tax) directly within the form (GST = Price/11) This functionality has been implemented with the following script. Additionally, the calculation needs to be adjust ...

The border on a specific field is not showing up when using Django Crispy Forms

Utilizing bootstrap and crispy forms for styling my website has been successful, except for a border issue with the username fields. While all other fields are displayed correctly, the username fields appear without a border as shown in the image below: h ...

iPhone has trouble accessing alternative forms of content

<object width="300" height="100" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param value="5352f5c8e96c251fb9d79890f2294608.swf" name="movie"> <!--[if !IE]>--> <object width="300" height="100" data="5352f5c8e96 ...

The Bootstrap Navbar responsive menu fails to automatically close after a link has been clicked

Experimenting with implementing a Bootstrap navbar in a Vue js project that was set up using the command "vue create sitoprova". The following libraries were imported: dependencies": { "bootstrap": "^4.4.1", "bootstrap-vue": "^2.13.0", "core-js ...

What is the best method to shift an element to the top by a fraction of its height, namely -100%?

I am facing an issue with an element where I set top: -100%. My requirement is to translate top: -100% to top: -{height-of-the-element}. Unfortunately, instead of getting top: -{height-of-the-element}, I am getting top: -{height-of-another-element-wrapping ...

The jQuery AJAX request is not properly nesting the HTML elements generated by PHP

I am currently utilizing jQuery to intercept a link that leads to a php file. This particular php file consists mostly of html, but also calls two php functions that utilize for loops to generate html content. The issue I am facing is that the ajax call is ...

Disable form input fields while keeping all other elements enabled

Currently, I am facing a dilemma where I must deactivate specific input fields within a form. Given that there are numerous fields to consider, individually disabling each one seems impractical. Can anyone offer advice on how to disable a set of elements ...

What is the best way to convert this JavaScript iteration function into jQuery?

I recently encountered an issue with my JavaScript function that returns a list of elements with the class ".youtube", loops through them, and calls another function. The JavaScript logic is flawless, but I wanted to convert it into jQuery for better reada ...

Code an AJAX login form using PHP, HTML, CSS, jQuery, and MySQL

I'm struggling with the login functionality on my website. Despite entering correct details, users are unable to log in using their name and email ID. As a beginner in using Ajax, I need guidance on how to troubleshoot this issue. What steps should I ...

Issue with Bootstrap dropdown menu not showing up/functioning

I've spent the entire day trying to find a solution and experimenting with various methods, but I'm still unable to get it to work. The navbar-toggle (hamburger menu) shows up when the window is resized, but clicking on the button doesn't di ...

Monitoring Logfile in Ruby On Rails 3.1

Within my Ruby on Rails application, I have a set of scripts that need to be executed. In order to ensure they are working properly, the application must display and track the content of logfiles generated by these scripts. To provide more context: I util ...

Using AJAX to dynamically load an image by setting the image path as the source of the image tag

I'm facing a challenge with my AJAX call that is used to display user details in a modal. I recently integrated an image upload feature for users, but now I'm struggling to display the uploaded image. I have tried looking for solutions online, bu ...

The banner appears unusually compact when viewed on mobile devices

It's about time for me to delve into the intricacies of responsive and adaptive design, but I'm hoping there's a straightforward solution to tackle this issue. Here is my desktop web page as displayed in my browser: https://i.stack.imgur.c ...

What is the best way to combine PHP and HTML within a JavaScript script?

I'm facing a challenge with integrating dynamically added elements and a populated drop down on my form. Is there a way to combine the two seamlessly? Below is the code snippet I'm using for dynamically adding and removing elements: $(docu ...