how do I apply a class to the header cell for a column in slickgrid


Tags: css,slickgrid

Problem :

I have a column in slickgrid where all the cells need to have some padding applied to the right side of the cell. I use the cssClass property when initializing the columns for the grid, but this applies only to the non-header cells of the column. How do I specify a css class to use for the header as well so I can apply the right padding to it as well? Without that padding, the header cell becomes slightly out of line with the rest of the cells below it.



Solution :

If these styles apply to all cells, you can style them using the built-in .slick-cell and .slick-headerrow-column CSS classes. One thing to watch out for, however, is that your styles may not override SlickGrid's defaults if they have lower rule specificity. If that's an issue in your app, either increase specificity of your rules or use !important - .slick-cell { padding-right:10px !important; }.


    CSS Howto..

    How to create Curved & Overlapping Menu Tabs in CSS

    jQuery Tooltip - How To Declare 2 Options

    Showing/hiding elements inside a div block with HTML and CSS

    css rules multi class, how to match two out of many

    how to make the file input field wrap?

    How to render a template containing CSS with }} sequence inside using Twig

    how to combine widget webapp framework with SEO-friendly CSS and JS files

    How to style only a sub-class with .css?

    How to customize bootstrap css when using bootstrap-sass [closed]

    How to set the background image of an DIV in CSS?

    How to break up an HTML List using CSS Only

    How do I vertically center an image whose size can change in a div?

    How to use top middle and center inside a div

    How to resize two divs on the click of a link

    how could I make a textarea dynamically resize with the chrome app window?

    How to brighten Textbox when it is focused?

    How to add class with data-attribute?

    How I add a CSS class to first element of an array in PHP?

    IE11: How to prevent sprite animating to correct co-ords

    How to set CSS rule for a LI in a UL nested in DIV with class?

    How to add Indian rupee symbol to the RadioButtonList control in asp.net using CSS design

    how I can change the size of font inside PHP

    How to flow text from a box to another with CSS

    How can I avoid using too many classes in CSS?

    How can I avoid div from executing new line if one line is already full?

    How do we write a CSS “block-level-style” within an inline style attribute tag?

    CSS - How to make footer stay at the bottom of the page?

    How do I overlap PNG images for a “build your own t-shirt” product display page - javascript/css/asp

    How to use CSS to create a dynamic corner frame?

    How to avoid calling “fonts.googleapis.com/css?family=..” for my CSS files