{"id":984,"date":"2016-09-29T04:19:59","date_gmt":"2016-09-29T09:19:59","guid":{"rendered":"https:\/\/www.teamdesk.net\/blog\/?p=984"},"modified":"2016-09-29T05:28:05","modified_gmt":"2016-09-29T10:28:05","slug":"customize-database-look","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/","title":{"rendered":"Customize your database look using CSS"},"content":{"rendered":"<p>We often receive questions on how to customize database UI.\u00a0Can one right-align database title? Decrease font size? Reduce paddings? Add icon and color to the button? These are only some challenges, there are many more.<\/p>\n<p>Some requests were fulfilled &#8211; font size and padding can be decreased via Adjust Font Size labs&#8217; feature, while some, like icons and colors for buttons are planned. Some requests, however, won&#8217;t likely see the light.<\/p>\n<p>Many aspects of elements&#8217; appearance\u00a0of <a href=\"https:\/\/www.teamdesk.net\">TeamDesk<\/a> database UI is controlled via <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cascading_Style_Sheets\">cascading style sheets<\/a>. So, today we&#8217;ve\u00a0added a\u00a0little hack to element styles.<\/p>\n<p><!--more-->Drop the file named dbstyles.css into <a href=\"https:\/\/www.teamdesk.net\/help\/12.7.aspx\">database resources<\/a>. If such file exists we&#8217;ll load it together with TeamDesk styles. Since\u00a0your styles are included last, you&#8217;ll have all the abilities to override any style we defined.<\/p>\n<p>Take a look at the screenshots above. It takes 30 lines of CSS code to make all those changes with comments included:<\/p>\n<pre style=\"font-size: 80%;\"><span style=\"color: #800000;\">#td-topmenu<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* decrease font size in top bar *\/<\/span>\r\n\u00a0<span style=\"color: #ff0000;\">font-size<\/span>: <span style=\"color: #0000ff;\">8px<\/span>;\r\n\u00a0<span style=\"color: #ff0000;\">line-height<\/span>: <span style=\"color: #0000ff;\">10px<\/span>;\r\n}\r\n\r\n<span style=\"color: #800000;\">#td-apptitle<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* fancy font for title *\/<\/span>\r\n\u00a0<span style=\"color: #ff0000;\">font<\/span>: <span style=\"color: #0000ff;\">normal 20px 'Comic Sans MS'<\/span>;\r\n\u00a0<span style=\"color: #ff0000;\">line-height<\/span>: <span style=\"color: #0000ff;\">26px<\/span>;\r\n}\r\n\r\n<span style=\"color: #800000;\">#td-createnew &gt; a.ui-button<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* customize background for Create New *\/<\/span>\r\n\u00a0<span style=\"color: #ff0000;\">background<\/span>: <span style=\"color: #0000ff;\">#b6ff00<\/span>;\r\n}\r\n\r\n<span style=\"color: #800000;\">#td-createnew &gt; a.ui-button::before<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* Remove (+) icon from Create New *\/<\/span>\r\n\u00a0<span style=\"color: #ff0000;\">content<\/span>: <span style=\"color: #0000ff;\">\"\"<\/span>;\r\n}\r\n\r\n<span style=\"color: #800000;\">a[href$=\"\/overview.aspx?t=909\"]:before<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* Add (+) icon to Invoices *\/<\/span>\r\n\u00a0<span style=\"color: #ff0000;\">display<\/span>: <span style=\"color: #0000ff;\">inline-block<\/span>;\r\n\u00a0<span style=\"color: #ff0000;\">vertical-align<\/span>: <span style=\"color: #0000ff;\">middle<\/span>;\r\n\u00a0<span style=\"color: #ff0000;\">font-family<\/span>: <span style=\"color: #0000ff;\">\"icons\"<\/span>;\r\n\u00a0<span style=\"color: #ff0000;\">content<\/span>: <span style=\"color: #0000ff;\">\"\\E813\"<\/span>;\r\n\u00a0<span style=\"color: #ff0000;\">margin-right<\/span>: <span style=\"color: #0000ff;\">2px<\/span>;\r\n}<\/pre>\n<p>To help with style scoping &lt;body&gt; tag of each page has an identifier built from the name of the page and table&#8217;s internal\u00a0identifier,\u00a0<em>overview_t_909<\/em>. You can then use CSS selectors to apply changes either to specific page in particular table, all tables, or all pages in specific table:<\/p>\n<pre style=\"font-size: 80%;\"><span style=\"color: #800000;\">body[id^=\"overview\"] #td-createnew<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* Styles Create New button of any overview page *\/<\/span>\r\n}\r\n\r\n<span style=\"color: #800000;\">body[id$=\"t_909\"] #td-createnew<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* Styles Create New button of any Invoice page *\/<\/span>\r\n}\r\n<span style=\"color: #800000;\">\r\nbody#overview_t_909 #td-createnew<\/span> {\r\n<span style=\"color: #008000;\">\u00a0\/* Styles Create New button of Invoice's overview page *\/<\/span>\r\n}<\/pre>\n<p>Please remember, it is rather <em>a hack<\/em>, not the supported feature. We won&#8217;t recommend using it for anything but pinpoint changes. Styles are closely tied to page structure and we reserve the rights to shuffle elements and styling without prior notice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We often receive questions on how to customize database UI.\u00a0Can one right-align database title? Decrease font size? Reduce paddings? Add icon and color to the button? These are only some challenges, there are many more. Some requests were fulfilled &#8211; font size and padding can be decreased via Adjust Font Size labs&#8217; feature, while some, [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":985,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-984","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-tricks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Customize your database look using CSS - TeamDesk Blog<\/title>\n<meta name=\"description\" content=\"Customize database look by adding the file named dbstyles.css into database resources. You&#039;ll have all the abilities to override any style defined by us.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Customize your database look using CSS - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"Customize database look by adding the file named dbstyles.css into database resources. You&#039;ll have all the abilities to override any style defined by us.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-29T09:19:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-09-29T10:28:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2016\/09\/dbstyles.png\" \/>\n\t<meta property=\"og:image:width\" content=\"744\" \/>\n\t<meta property=\"og:image:height\" content=\"278\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Kirill Bondar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirill Bondar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/\"},\"author\":{\"name\":\"Kirill Bondar\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"headline\":\"Customize your database look using CSS\",\"datePublished\":\"2016-09-29T09:19:59+00:00\",\"dateModified\":\"2016-09-29T10:28:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/\"},\"wordCount\":254,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/dbstyles.png\",\"articleSection\":[\"Tips &amp; Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/\",\"name\":\"Customize your database look using CSS - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/dbstyles.png\",\"datePublished\":\"2016-09-29T09:19:59+00:00\",\"dateModified\":\"2016-09-29T10:28:05+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"description\":\"Customize database look by adding the file named dbstyles.css into database resources. You'll have all the abilities to override any style defined by us.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/dbstyles.png\",\"contentUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/dbstyles.png\",\"width\":744,\"height\":278,\"caption\":\"customize database styles\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/customize-database-look\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customize your database look using CSS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\",\"name\":\"Kirill Bondar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"caption\":\"Kirill Bondar\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/kirill-bondar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Customize your database look using CSS - TeamDesk Blog","description":"Customize database look by adding the file named dbstyles.css into database resources. You'll have all the abilities to override any style defined by us.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/","og_locale":"en_US","og_type":"article","og_title":"Customize your database look using CSS - TeamDesk Blog","og_description":"Customize database look by adding the file named dbstyles.css into database resources. You'll have all the abilities to override any style defined by us.","og_url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/","og_site_name":"TeamDesk Blog","article_published_time":"2016-09-29T09:19:59+00:00","article_modified_time":"2016-09-29T10:28:05+00:00","og_image":[{"width":744,"height":278,"url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2016\/09\/dbstyles.png","type":"image\/png"}],"author":"Kirill Bondar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirill Bondar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/"},"author":{"name":"Kirill Bondar","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"headline":"Customize your database look using CSS","datePublished":"2016-09-29T09:19:59+00:00","dateModified":"2016-09-29T10:28:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/"},"wordCount":254,"commentCount":1,"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2016\/09\/dbstyles.png","articleSection":["Tips &amp; Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/","url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/","name":"Customize your database look using CSS - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#primaryimage"},"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2016\/09\/dbstyles.png","datePublished":"2016-09-29T09:19:59+00:00","dateModified":"2016-09-29T10:28:05+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"description":"Customize database look by adding the file named dbstyles.css into database resources. You'll have all the abilities to override any style defined by us.","breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#primaryimage","url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2016\/09\/dbstyles.png","contentUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2016\/09\/dbstyles.png","width":744,"height":278,"caption":"customize database styles"},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/customize-database-look\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Customize your database look using CSS"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2","name":"Kirill Bondar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","caption":"Kirill Bondar"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/kirill-bondar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=984"}],"version-history":[{"count":5,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/984\/revisions"}],"predecessor-version":[{"id":1000,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/984\/revisions\/1000"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media\/985"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}