Issue with backdrop-filter and the <table> element not being compatible

Is it possible to achieve a Glassmorphism effect for each row in a table using CSS styling? I tried using backdrop-filter with the tr tag, but it doesn't seem to work. What are some alternative CSS properties that can be used to achieve a blur effect for rows?

<!DOCTYPE html>
<Style>
  body {
    background: rgb(179, 179, 201);
    background: linear-gradient(90deg, rgba(179, 179, 201, 1) 0%, rgba(216, 216, 224, 1) 99%);
  }
  
  table {
    margin-top: 5%;
    margin-left: 20%;
    width: 50%;
    border-collapse: separate;
    border-spacing: 0 40px;
  }
  
  tr {
    height: 100px;
    padding: 50px;
    background: rgba( 4, 9, 210, 0.30);
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37);
    backdrop-filter: blur( 2.5px);
    -webkit-backdrop-filter: blur( 2.5px);
    border: 1px solid rgba( 255, 255, 255, 0.18);
  }
</style>

<body>
  <table cellspacing=0>
    <tbody>
      <tr>
        <td>Jill</td>
        <td>Smith</td>
        <td>50</td>
      </tr>


      <tr>
        <td>John</td>
        <td>Doe</td>
        <td>80</td>
      </tr>
    </tbody>
  </table>
</body>

</html>

Answer №1

When applying the backdrop-filter to the td element instead, the desired effect is achieved. I have also included a more defined image to display the results.

body{
    background: rgb(179,179,201);
    background: linear-gradient(90deg, rgba(179,179,201,1) 0%, rgba(216,216,224,1) 99%);
    background: url(http://www.fillmurray.com/1000/1000);
}
table{
    margin-top: 5%;
    margin-left: 20%;
    width:50%;
    border-collapse: separate;
    border-spacing: 0 40px;
}
tr{
    height: 100px;
    padding:50px;
    background: rgba( 4, 9, 210, 0.30 );
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    border: 1px solid rgba( 255, 255, 255, 0.18 );
}
td {
    backdrop-filter: blur( 10px );
    -webkit-backdrop-filter: blur( 10px );
}

Remember to properly close your style element. Note that backdrop-filter may not function as expected on Firefox without additional configuration.

Answer №2

*Update: Limited browser support (tested on Safari, Chrome, and Firefox - default settings may vary)

To enhance the blur effects, ensure that the opening <style> tag begins with a lowercase letter. It is recommended to have a background image or other elements behind the tr elements for the blur effect to stand out. Below, there is a div with an id of #Test_Rectangle to demonstrate the impact of the backdrop-filter(). Be aware that Firefox's default setup does not fully support backdrop-filters. Click on the blue Run code snippet button below to view the outcome:

body {
  background: rgb(179, 179, 201);
  background: linear-gradient(90deg, rgba(179, 179, 201, 1) 0%, rgba(216, 216, 224, 1) 99%);
}

#Test_Rectangle{
position: absolute;
height: 50vw;
width: 50vw;
top: 0px;
left: 0px;
background: cyan;
}

table {
  margin-top: 5%;
  margin-left: 20%;
  width: 50%;
  border-collapse: separate;
  border-spacing: 0 40px;
}

tr {
  height: 100px;
  padding: 50px;
  background: rgba(4, 9, 210, 0.30);
  box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
<html>
<body>

<div id="Test_Rectangle"></div>

  <table cellspacing=0>
    <tbody>
      <tr>
        <td>Jill</td>
        <td>Smith</td>
        <td>50</td>
      </tr>

      <tr>
        <td>John</td>
        <td>Doe</td>
        <td>80</td>
      </tr>
    </tbody>
  </table>
</body>

</html>

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

Tips for setting up personalized breakpoints for a Bootstrap navbar

I am currently facing an issue with my navbar on tablet view. Despite implementing custom breakpoints to collapse the navbar at 1050, the menu bar is appearing in two rows instead of one. I have tried using the code below but it doesn't seem to be wor ...

Assigning ng-Attributes using vanilla JavaScript

My journey with coding Angular started not too long ago. I have a HTML structure with various divs and classes. I am looking to loop through these classes and add a tooltip to a specific div within each class. Rather than hardcoding the Angular attributes ...

Difficulty encountered when trying to use Bootstrap tooltip with Bootstrap icon

Attempting to implement bootstrap tooltips on bootstrap icons with the following code: <body> <script> const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') ...

Ensure all input-group-addons have equal width with Bootstrap 4

Can the width of all prepend add-ons be made the same? For example, in this image, I would like Email, License Key 1, & License Key 2 to have equal lengths. Is this achievable? If I were to forgo add-ons and only use regular labels and a form grid, it wo ...

Basic Search tool, displaying a <div>

Hey there, I've been searching for a solution for a while now and haven't found one yet. So here's my question: I created a simple website to display random recipes for those times when you're not sure what to make for dinner. I also w ...

In PHP/HTML, input submit does not work with CSS styling

I am struggling with styling the input submit button in my form. I want the button to appear as text with a change in background and font color on hover. Any solutions? input[type="submit"] { font-family: made, mirage; text-decoration: none; backg ...

Ways to use jQuery to disable row form elements in the second and third columns

I need a way to deactivate form elements in the second and third columns, starting from the second row until the nth row using a jQuery selector. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> ...

Modify the NAME attribute when clicked using Jquery

I am attempting to modify the NAME attribute of a DIV with the text from a textbox using jQuery. Take a look at my code snippet: http://jsfiddle.net/e6kCH/ Can anyone help me troubleshoot this issue? ...

Curved edges on pictures

http://jsfiddle.net/48Y37/ I'm trying to achieve rounded corners on both ends of the top of an image, but the image itself is covering them up. I've searched online and found suggestions like using overflow: hidden; or even resorting to JavaScri ...

Switch back to the original CSS when a different button is clicked by the user

I am facing an issue with my jQuery UI accordion where the arrow icons are not behaving as expected. Each header element has a right arrow that changes to a down arrow when clicked to display content, and reverts back to its original form when clicked agai ...

Utilize HTML5 local storage to highlight a specific row in a table

Currently, we are in the process of developing a code that involves marking table rows using HTML5 local storage and jQuery. Below is the initial code snippet... $(document).ready(function () { $('table tbody tr').click(function() { ...

JQuery Multi-Filterizer

My webpage showcases a list of posts from custom-post-type. For each post, I am displaying the title, status, and category: <div class="adherents"> <article class="adh-1185 association work adh"> <h2>Title</h2> ...

What significance does this change in font size hold?

Similar Question: Understanding the CSS Usage Could you explain the purpose of this font resizing code in CSS? font:12px/170% Verdana,sans-serif ...

Dynamic Menu Navigation (No Bootstrap Required)

My Navbar is working perfectly in the original mode but when the screen width is less than 950px, it displays the buttons stacked vertically. However, the dropdown button opens the dropdown content on the wrong side. I want the dropdown content to appear u ...

Utilizing Angular's ngShow and ngHide directives to hide spinner when no data is retrieved

I'm having an issue with the HTML code below. It currently displays a spinner until a list of tags is loaded for an application. However, the spinner continues even if no events exist. I want to make the spinner disappear and show either a blank inpu ...

What is the best way to align the bottom of an anchor element with the bottom of an SVG element when positioning them together

I am working on a test website where I am trying to create an interesting visual layout. My goal is to place an SVG image in the background, with an anchor element and other elements laid out above it. The challenge I am facing is aligning the bottom of th ...

Numerous Selection Boxes

I came across this code snippet on the web. How can I insert the output into an email? Usually, I follow this format: $name = $_POST['name']; $email_body = "$name"; I want to incorporate the output of this code into my $email_body variable. Is ...

Does anyone know of a CSS validator that is more lenient than W3C's and can validate stylesheets like normalize.css?

I have encountered an issue while using H5BP - the W3C CSS Validator is showing errors for both normalize.css and main.css. Is there a tool available to check for syntax errors specifically for these files? Additionally, I am wondering why the line of cod ...

Every time I attempt to create a detail page for a table, I am consistently greeted with an error message

Error: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /var/www/2909kher/entabell/detaljer.php on line 23 <!doctype ...

The display of treepanel response text on an extjs grid within a layout-browser is achieved through the use of the

I am attempting to showcase an ExtJS grid and tree within a layout-browser. The tree's response data is displayed in the ExtJS grid, which then dynamically refreshes. My goal is that when I click on a tree leaf, the data from that leaf should be displ ...