This is a migrated thread and some comments may be shown as answers.

How to set cell spacing/padding?

2 Answers 1048 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 08 Mar 2012, 11:05 PM
Hello, my grid is setup pretty similar to this example:
http://demos.kendoui.com/web/grid/rowtemplate.html 


My question is, how can I set cell spacing and/or padding?  I tried setting it in the table element and it seems to be ignored.  To go back to the example, there is a little space between the images on each row, what if you wanted to reduce that space to zero?  

My issue is there is too much extra space, it's more noticeable in my case because the rows are shorter, how do I get rid of it?  I actually tried setting the cellpadding and cellspacing to a high number just to see if it is being observed but it doesn't seem to have any impact.  

2 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 12 Mar 2012, 10:35 AM
Hello Kjell,

There is a padding set for the table elements in Kendo UI Grid but you could use a CSS selector with the widget's specific CSS class for customizing the presentation. This action will override the common styling.

For example this snippet can be used for removing the space between the images on each row of your Grid:
.k-grid td
{
  padding: 0;
}
     
.k-grid img
{
  vertical-align: top;
}

I hope this helps.




Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kjell
Top achievements
Rank 1
answered on 12 Mar 2012, 05:30 PM
Ah thanks, that did it. 
Tags
Grid
Asked by
Kjell
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Kjell
Top achievements
Rank 1
Share this question
or