Angular Material - Data Table Kit

Struggling with setting custom styling for a mat-table in Angular Material. I want to adjust the border radius of the table and change the spacing inside to "space-between". The design I'm aiming for is shown here: Design

Any tips or suggestions would be greatly appreciated!

Answer №1

Here are the CSS modifications you need:

.mat-table {
  overflow: auto;
  max-height: 400px; // updated value
  border-radius: 8px; // updated value
}

.example-container{
  border-radius: 8px; // updated value
}

Answer №2

To start, make sure to verify if a border style has been applied to the mat-table. From what I understand, mat-table does not come with a default border. If not, you can add a border style by using /deep/ before the class name in your CSS file for it to take effect.

/deep/ .mat-table {
            border: 1px solid;
            border-radius: 30%; 
        }

Alternatively, you can also include

 encapsulation: ViewEncapsulation.None,

as an argument in the @component decorator in your component.ts file.

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

Ways to prevent html header content from being incorporated in jquery post outcomes

I've implemented jquery's "$.post()" function to insert a new list entry into the mysql database using php. $(document).ready(function(){ $(".theSubmit").click(function(){ var content = $("textarea").val(); var listn = $("in ...

Unsubscribing from a nested observable - a step-by-step

In our Angular component, we leverage the ngOnDestroy() method to handle canceling http requests that are still pending when navigating away from a page. To avoid reloading data that has already been fetched, we utilize a custom generic cache helper on cer ...

Kik Card - Using Synchronous XMLHttpRequest within the Kik.js Script

Getting ready to create a mobile web app powered by Kik! First step, insert the Kik.js script at the bottom of your HTML page... <!-- add this script to your webpage --> <script src="http://cdn.kik.com/kik/2.3.6/kik.js"></script> Excel ...

HTML5 audio recording

I have been exploring different methods to record audio using HTML5, but so far I have not found a solution. I attempted to utilize this particular example without success. It seems that the statement about lack of support from any browser may be true. ...

The disabled button is not displayed when it is disabled

Encountering an issue specific to Chrome version 60.0.3112.90 where changing the disabled attribute of a button causes it to disappear. A minimal, complete, and verifiable example has been prepared wherein clicking the + button toggles the disabled attri ...

Scraping data from Mass Lottery's website with the help of Beautiful Soup

I am currently using beautiful soup to extract all the keno numbers that have ever been drawn. While I have a good understanding of how to achieve this, I am encountering an obstacle. My goal is to retrieve both the game numbers and the corresponding winni ...

Developing step code for CucumberJS Scenario Outlines

In my feature file, I have the following scenario outlined for testing colors: Feature: Color feature @test Scenario Outline: Test color Given the first color is <COLOR_ONE> And the second color is <COLOR_TWO> ...

Modifying the Vue.js Vue3-slider component for custom color schemes

Currently, I am using the vue-slider component and would like to customize the color of the slider itself. The specific class that needs to be styled is "vue-slider-dot-tooltip-inner". Below is a screenshot displaying the original CSS styling for vue-slid ...

Press a single button to toggle between displaying and hiding the table

$(document).ready(function() { $("#t1").hide(); // hide table by default $('#sp1').on('click', function() { $("#t1").show(); }); $('#close').on('click', function() { $("#t1").hide(); }); }); <li ...

Master the art of string slicing in JavaScript with these simple steps

I am attempting to utilize the slice function to remove the first three characters of a string within a JSON object. $(document).ready(function() { $.ajaxSetup({ cache: false }); setInterval(function() { $.getJSON("IOCounter.html", functio ...

Filtering out section boxes does not eliminate empty spaces

Link to Fiddle I've run into a bit of a roadblock while trying to filter my section box for a project I'm currently working on. The issue I'm facing is that instead of collapsing the first section box to display only the filtered options, i ...

I desire a smooth fade-in transition for the background image when the addClass function is

If the background color is set to header-fixed-position, the color will fade in. However, if the background is an image, the image will not fade in. Apologies for my lack of proficiency in English. Please refer to the sample code below. Try removing the c ...

How to manipulate dates using Angular 2's date pipe to add or subtract hours

I am encountering an issue with the new Angular 2 Date Pipe. My date value is as follows: let myDate = '2017-01-31T17:53:36' When I use the Date Pipe to format it in the view like this; {{myDate | date: 'dd/MM/yyyy HH:mm' }} It dis ...

Display and conceal different sections using hyperlinks

Hey there, I'm back with another issue related to this code snippet on jsfiddle: https://jsfiddle.net/4qq6xnfr/9/. The problem I'm facing is that when I click on one of the 5 links in the first column, a second div appears with 3 links. Upon clic ...

The sticky navigation bar allows for the overlapping of additional div elements

Here is the HTML AND SCSS(SASS) code for a NAVBAR: <div id="navbar"> <ul> <li><a href="#home">Home</a></li> <li><a href="#main">Main</a></li> ...

Creating a Form with HTML and CSS

I am currently working on setting up a banner that includes an overlay with a cutout. Beneath the overlay, there is an image. My goal is to create this design using HTML and CSS. I have been experimenting with pseudo-elements but I am having difficulty re ...

Can a stack method be utilized to create a HTML tag checker?

I've been developing a project to create an HTML validation tool based on stacks, but I've encountered some issues. The main objective is to verify if the HTML tags are correctly nested and closed. However, there seem to be discrepancies in the r ...

Merging a finished callback with injecting Angular 2 unit testing

One feature I appreciate is the ability to pass in a done-callback when creating unit tests, allowing for explicit control over when a test is considered complete. Could someone provide insight on how this can be integrated with dependency injection in Ang ...

Automatic page updates triggered by code modifications

I am currently working on a .NET ASPX page where I usually write my classes separately in the app_code folder. However, for this specific page, I needed a temporary class that is only required by this page. So instead of creating a separate file, I decid ...

Remove specific data from jQuery datatables using data attribute

My jQuery datatable is loaded with data from a database without any filtering by default, providing all the necessary information for users. In addition to the built-in search functionality of jQuery datatables, I have incorporated custom search input fiel ...