Categories | Question details Back To List | ||
Grid TD Cell Padding Unable to set TD cell padding. Attempting to override the bottom padding of a custom skin without success. HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Results Grid</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <!-- Include Style Sheet --> <link href="../style/dhtmlxgrid.css" type="text/css" rel="stylesheet"> <!-- Include Java Script --> <script src="../script/dhtmlxcommon.js" type="text/javascript"></script> <script src="../script/dhtmlxgrid.js" type="text/javascript"></script> <script src="../script/dhtmlxgridcell.js" type="text/javascript"></script> <script type="text/javascript"> var gridResults; function documentLoad() { // Create Results Grid. gridResults = new dhtmlXGridObject( "gridResults" ); gridResults.setImagePath("codebase/imgs/"); gridResults.enableAutoHeight(true); gridResults.enableAutoWidth(false); gridResults.setHeader( "#,Name,Type,Location,Currency" ); gridResults.setInitWidths( "25,*,75,200,70" ); gridResults.setColAlign( "center,left,center,center,center" ); gridResults.setSkin( "results" ); gridResults.setColTypes( "ro,ro,ro,ro,ro" ); gridResults.setColSorting( "int,str,str,str,str" ); gridResults.init(); gridResults.addRow( "1", "1.,First Record,C,London,EUR", 0 ); // id, values, index gridResults.addRow( "2", "2.,Second Record,A,Paris,FRN", 1 ); // id, values, index gridResults.addRow( "3", "3.,Third Record,B,Moscow,RUB", 2 ); // id, values, index } </script> <style type="text/css"> div.gridbox_results table.obj td { padding: 1px 1px 50px 1px; } </style> </head> <body onload="documentLoad()"> <div id="gridResults" style="width:100%;height:100%;"></div> </body> </html> Thanks very much. Answer posted by Support on Oct 31, 2008 08:04 In case of grid in single-line mode, there is one more class , which affects padding , so you can extend you css rule div.gridbox_results table.obj tr td { padding: 1px 1px 50px 1px; } or just use !important flag div.gridbox_results table.obj td { padding: 1px 1px 50px 1px !important; } P.S. by the way, you may not specify index in addRow command, it will add row to the end of the grid by default Answer posted by bohnd@oclc.org on Oct 31, 2008 08:13 Thanks that worked. Still a newbie but I'm impressed with your product and your support. Good job! Also thanks for the tip. May I also recommend adding the "div.gridbox_results table.obj tr td" style to the styles list in your documentation under Grid:Visual Appearance:Creating Custom Skin. Answer posted by Support on Oct 31, 2008 08:17 >>to the styles list in your documentation sure, we will update online documentation |