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

Issue with k-dirty and right text alignment

2 Answers 241 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Roth
Top achievements
Rank 1
Brian Roth asked on 07 Jan 2013, 05:27 PM
We have a number of cases where we have right-aligned numeric values inside of our grids using the CSS text-align property. However, the k-dirty span is no longer aligned at the top left corner of the table cell. Since the table cells are styled using the HtmlAttributes property for the column, there does not seem to be an easy way to style the cell content without also affecting the k-dirty element. We have come up with a work-around by overriding the k-dirty class as follows:

.k-dirty {
    display:block;
    margin: -0.4em 0 0 -0.6em;
    position:relative;
}
Has anyone come up with a better solution to this problem?

I have attached a small screenshot to illustrate the issue.

Thanks in advance!
Brian Roth

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Jan 2013, 04:50 PM
Hi Brian,

By design the dirty mark is absolutely positioned without any top and left styles. These styles cannot be set for elements inside a table cell, because the dirty mark will end up being outside the cell.

So in all cases the fine positioning is made by hard-coding some margins, as you have done.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Oscar
Top achievements
Rank 1
answered on 30 Jul 2013, 03:39 PM
Hi Bryan,
I'm using this to align the k-dirty span at the top left corner of the cells that I have right aligned:
.k-dirty-cell {
   position: relative;
}
 
   .k-dirty-cell .k-dirty {
      left: 0px;
      margin-left:0px;
   }
(The position of k-dirty span is already absolute.)

Hope this helps.

Oscar.
Tags
Grid
Asked by
Brian Roth
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Oscar
Top achievements
Rank 1
Share this question
or