Solution 1 :

add this to your table in css:

  border-collapse: collapse;

Solution 2 :

Looks like it’s a border-spacing CSS property set to 1 or so pixels on your table element.

You need to inspect the table and child td and th elements in Chrome or whichever browser’s developer tools, and see what CSS styles are attached to those elements.

Specifically, you’re checking the table element for border-spacing (as Pete mentions above) with border-collapse set to ‘collapse‘, and then also double-check padding on the td/th elements, because it seems like you’ve some padding on those cells as well, from the screenshot.

table { 
   border-collapse: separate; /* for border-spacing to work */
   border-spacing: 0px; /* or however much space you want */

td, th { 
   /* or however much padding you want */
   padding-left: 0; 
   padding-right: 0;

If there’s already styles attached to these elements, you’ll need to find where they’re defined in the CRUD application framework you’re developing in to change them…or alternatively, create more specific CSS rules to target this table in your application, so the default values aren’t affected for other parts of your application, if that’s desired.

Problem :

enter image description here

I am creating CRUD application and don’t know how to remove this left and right spaces coming in th and td

thanx in advance 🙂


Comment posted by GucciBananaKing99

Provide some code

Comment posted by border-spacing

Most likely need to remove the

Comment posted by Harun Yilmaz

You need to put your code instead of the screenshot for us to understand what is going on under the hood. This way it is impossible to answer.

Comment posted by How to remove unwanted space between rows and columns in table?

Does this answer your question?

Comment posted by Lucas Marra

border-spacing: 0;

Comment posted by Pulse

Glad I could help. If you accept and like my answer it would be great because someone disliked my answer and I lost 2 reputation

Comment posted by Priyanshu

i would definatly do that but i need 15 reputation to like someones answer ……would do it after i get the reputations 🙂