In the latest version - Guriddo_jqGrid_JS_4.8.2, inorder to change the font style of grid-row elements, just this one change worked for me - in ui.jqgrid.css
You can also format a specific grid column by referencing it in your custom css by the grid name and use the aria-describedby property to target the specific column. For example:
There is an excellent post about this on the jqGrid Forum.
Essentially you can do what Mano suggests and modify the css file directly, or you can create your own in-line style if you need more flexibility. For example:
.ui-jqgrid {font-size:0.8em}
If you do create an inline style you may need to make it more specific to pick up grid rows:
I recently did this for version 4.5.4 of the jqGrid, and had to override more than just the parent .ui-jqgrid selector. In this example, I wanted all text anywhere in the grid to be 12px versus the default of 11px:
/* Bump up the font-size in the grid */
.ui-jqgrid,
.ui-jqgrid .ui-jqgrid-view,
.ui-jqgrid .ui-jqgrid-pager,
.ui-jqgrid .ui-pg-input {
font-size: 12px;
}
Note that this was done in a separate CSS file, not by directly editing the packaged CSS file.
In the latest version - Guriddo_jqGrid_JS_4.8.2, inorder to change the font style of grid-row elements, just this one change worked for me - in ui.jqgrid.css
You can also format a specific grid column by referencing it in your custom css by the grid name and use the aria-describedby property to target the specific column. For example:
#Mygrid td[aria-describedby="Mygrid_myspecialcolumnname"] { font-size: 14px; }
You can read more about aria-describedby here: http://www.w3.org/TR/WCAG-TECHS/ARIA1.html
There is an excellent post about this on the jqGrid Forum.
Essentially you can do what Mano suggests and modify the css file directly, or you can create your own in-line style if you need more flexibility. For example:
If you do create an inline style you may need to make it more specific to pick up grid rows:
The very first line in
ui.jqgrid.css
is this:Change the font-size to what you need.
I recently did this for version 4.5.4 of the jqGrid, and had to override more than just the parent
.ui-jqgrid
selector. In this example, I wanted all text anywhere in the grid to be12px
versus the default of11px
:Note that this was done in a separate CSS file, not by directly editing the packaged CSS file.