60
Views
5
Comments
Solved
How to set border of Table Record's rows to 2 px;?
Question

Hi there,

I am wondering how to set the border of all table records' row to, say it 2 px:

i tried this, but it does not work:

.table-row {  border: 2px solid black;  border-collapse: collapse;}

thanks

2023-11-22 10-51-50
Jozy Sohail
Solution

Hi Indra,

If you add style .table-row td {
  border-bottom: 2px solid black;
}  then your result will be like this

But if you add style as .table-row td {
  border: 2px solid black;
} , then your result will be like this

Also to make the header 2px add the below class as well.

.table-header th {

border: 2px solid black; 

}

Add your classes like this 

Final output:

Hope it helps,

thanks

2025-01-09 14-56-57
IQ78

Thank u, Sir,

But in my Table Record there is HTML element Table... and it works for the element table, not the Table Record one.


2019-09-30 07-35-56
Aurelio Junior

Hello,

Try this CSS:

.table-row td {
  border-bottom: 2px solid black;
}

2025-01-09 14-56-57
IQ78

thanks, Sir.

It does not work on the Table record's rows, but it works on the html element table:

I mean this "green" row, not the "red" row:

2024-05-08 06-29-37
Prince Aadil Khan Panwar

hi @Indra Budiantho 

try to do this

.table-header th{

border-bottom: 2px solid black;

}

.table-row td{

border-bottom: 2px solid black;

}

as i am seeing that you are facing problem to modify the table css. i am sharing the link from there you will have the idea.  

https://www.w3schools.com/html/html_tables.asp

hope this helps

Thanks

Prince

2023-11-22 10-51-50
Jozy Sohail
Solution

Hi Indra,

If you add style .table-row td {
  border-bottom: 2px solid black;
}  then your result will be like this

But if you add style as .table-row td {
  border: 2px solid black;
} , then your result will be like this

Also to make the header 2px add the below class as well.

.table-header th {

border: 2px solid black; 

}

Add your classes like this 

Final output:

Hope it helps,

thanks

2025-01-09 14-56-57
IQ78

Thank u, Sir,

But in my Table Record there is HTML element Table... and it works for the element table, not the Table Record one.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.