MVCGrid.net - Keep column header and sort icon in one line

328 Views Asked by At

I am using MVCGrid.net in my ASP.NET MVC website and in some cases when there is not enough space the grid will move the header of a column either on top or below of the sort icon on the right to it.
Here is an example:
enter image description here

Is there any way to force the header and the icon to always stay in the same line instead of being moved on top or below of each other?

I already tried using white-space: nowrap, overflow: hidden and display: inline-block but none of these fixed the problem. I am currently using min-width as a temporary solution but this is not very elegant and depends on how long the header of a column is.

1

There are 1 best solutions below

3
On

white-space: nowrap should do the trick, but for it to work you need to set the table element to have table-layout:fixed;