{"id":3167,"date":"2019-07-04T14:02:01","date_gmt":"2019-07-04T14:02:01","guid":{"rendered":"https:\/\/www.internationalbasketballacademy.it\/2019\/07\/04\/table\/"},"modified":"2019-07-04T14:02:01","modified_gmt":"2019-07-04T14:02:01","slug":"table","status":"publish","type":"post","link":"https:\/\/www.internationalbasketballacademy.it\/en_us\/2019\/07\/04\/table\/","title":{"rendered":"Table"},"content":{"rendered":"<p class=\"uk-article-lead\">Easily create nicely looking tables, which come in different styles.<\/p>\n<h2 id=\"usage\"><a href=\"#usage\" class=\"uk-link-reset\">Usage<\/a><\/h2>\n<p>To apply this component, add the <code>.uk-table<\/code> class to a table. The table rows will be separated by lines.<\/p>\n<h3 class=\"tm-article-subtitle\">Example<\/h3>\n<div class=\"uk-overflow-container\">\n<table class=\"uk-table\">\n<caption>Table caption<\/caption>\n<thead>\n<tr>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<\/tr>\n<\/thead>\n<tfoot>\n<tr>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<\/tr>\n<\/tfoot>\n<tbody>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h3 class=\"tm-article-subtitle\">Markup<\/h3>\n<pre><code class=\"xml\"><span class=\"tag\">&lt;<span class=\"title\">table<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-table\"<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;<span class=\"title\">caption<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">caption<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;<span class=\"title\">thead<\/span>&gt;<\/span>\r\n        <span class=\"tag\">&lt;<span class=\"title\">tr<\/span>&gt;<\/span>\r\n            <span class=\"tag\">&lt;<span class=\"title\">th<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">th<\/span>&gt;<\/span>\r\n        <span class=\"tag\">&lt;\/<span class=\"title\">tr<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;\/<span class=\"title\">thead<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;<span class=\"title\">tfoot<\/span>&gt;<\/span>\r\n        <span class=\"tag\">&lt;<span class=\"title\">tr<\/span>&gt;<\/span>\r\n            <span class=\"tag\">&lt;<span class=\"title\">td<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">td<\/span>&gt;<\/span>\r\n        <span class=\"tag\">&lt;\/<span class=\"title\">tr<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;\/<span class=\"title\">tfoot<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;<span class=\"title\">tbody<\/span>&gt;<\/span>\r\n        <span class=\"tag\">&lt;<span class=\"title\">tr<\/span>&gt;<\/span>\r\n            <span class=\"tag\">&lt;<span class=\"title\">td<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">td<\/span>&gt;<\/span>\r\n        <span class=\"tag\">&lt;\/<span class=\"title\">tr<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;\/<span class=\"title\">tbody<\/span>&gt;<\/span>\r\n<span class=\"tag\">&lt;\/<span class=\"title\">table<\/span>&gt;<\/span><\/code><\/pre>\n<hr class=\"uk-article-divider\">\n<h3>Columns<\/h3>\n<p>To modify the column width or content, you can use other components. Here are some useful examples:<\/p>\n<div class=\"uk-overflow-container\">\n<table class=\"uk-table\">\n<thead>\n<tr>\n<th>Style<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>Column width<\/em><\/td>\n<td>Add one of the <code>.uk-width-*<\/code> classes from the <a href=\"\/en_us\/grid.html\/\">Grid component<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><em>Text alignment<\/em><\/td>\n<td>Add the <code>.uk-text-left<\/code>, <code>.uk-text-right<\/code> or <code>.uk-text-center<\/code> class from the <a href=\"\/en_us\/text.html\/\">Text component<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><em>Text style<\/em><\/td>\n<td>Take a look at the <a href=\"\/en_us\/text.html\/\">Text component<\/a>. For example add the <code>.uk-text-bold<\/code> class.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h4 class=\"tm-article-subtitle\">Markup<\/h4>\n<pre><code class=\"xml\"><span class=\"tag\">&lt;<span class=\"title\">td<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-width-1-10 uk-text-right\"<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">td<\/span>&gt;<\/span>\r\n<span class=\"tag\">&lt;<span class=\"title\">td<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-width-9-10 uk-text-bold\"<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">td<\/span>&gt;<\/span><\/code><\/pre>\n<hr class=\"uk-article-divider\">\n<h3>Vertical modifier<\/h3>\n<p>To vertically center table content, just add the <code>.uk-table-middle<\/code> class to the <code>&lt;tr&gt;<\/code> or <code>&lt;td&gt;<\/code> elements.<\/p>\n<hr class=\"uk-article-divider\">\n<h2 id=\"modifiers\"><a href=\"#modifiers\" class=\"uk-link-reset\">Modifiers<\/a><\/h2>\n<p>To display the table in a different style, just add a modifier to the the <code>.uk-table<\/code> class.<\/p>\n<h3>Table hover<\/h3>\n<p>Add the <code>.uk-table-hover<\/code> class to display a hover state on table rows.<\/p>\n<h4 class=\"tm-article-subtitle\">Example<\/h4>\n<div class=\"uk-overflow-container\">\n<table class=\"uk-table uk-table-hover\">\n<thead>\n<tr>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h4 class=\"tm-article-subtitle\">Markup<\/h4>\n<pre><code class=\"xml\"><span class=\"tag\">&lt;<span class=\"title\">table<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-table uk-table-hover\"<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">table<\/span>&gt;<\/span><\/code><\/pre>\n<hr class=\"uk-article-divider\">\n<h3>Table striped<\/h3>\n<p>Add zebra-striping to a table by adding the <code>.uk-table-striped<\/code> class.<\/p>\n<h4 class=\"tm-article-subtitle\">Example<\/h4>\n<div class=\"uk-overflow-container\">\n<table class=\"uk-table uk-table-striped\">\n<thead>\n<tr>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h4 class=\"tm-article-subtitle\">Markup<\/h4>\n<pre><code class=\"xml\"><span class=\"tag\">&lt;<span class=\"title\">table<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-table uk-table-striped\"<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">table<\/span>&gt;<\/span><\/code><\/pre>\n<hr class=\"uk-article-divider\">\n<h3>Table condensed<\/h3>\n<p>Add the <code>.uk-table-condensed<\/code> class to make table cells more compact.<\/p>\n<h4 class=\"tm-article-subtitle\">Example<\/h4>\n<div class=\"uk-overflow-container\">\n<table class=\"uk-table uk-table-condensed\">\n<thead>\n<tr>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h4 class=\"tm-article-subtitle\">Markup<\/h4>\n<pre><code class=\"xml\"><span class=\"tag\">&lt;<span class=\"title\">table<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-table uk-table-condensed\"<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">table<\/span>&gt;<\/span><\/code><\/pre>\n<hr class=\"uk-article-divider\">\n<h3>Combine modifiers<\/h3>\n<p>The modifiers of the Table component are combinable with each other.<\/p>\n<h4 class=\"tm-article-subtitle\">Example<\/h4>\n<div class=\"uk-overflow-container\">\n<table class=\"uk-table uk-table-hover uk-table-striped uk-table-condensed\">\n<thead>\n<tr>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h4 class=\"tm-article-subtitle\">Markup<\/h4>\n<pre><code class=\"xml\"><span class=\"tag\">&lt;<span class=\"title\">table<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-table uk-table-hover uk-table-striped uk-table-condensed\"<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">table<\/span>&gt;<\/span><\/code><\/pre>\n<hr class=\"uk-article-divider\">\n<h2 id=\"overflow-container\"><a href=\"#overflow-container\" class=\"uk-link-reset\">Responsive Table<\/a><\/h2>\n<p>If your table happens to be wider that its container element or would eventually get too big on a specific viewport width, just wrap it inside a <code>&lt;div&gt;<\/code> element and add the <code>.uk-overflow-container<\/code> class. This creates a container that provides a horizontal scrollbar whenever the elements inside it are wider than the container itself.<\/p>\n<h3 class=\"tm-article-subtitle\">Example<\/h3>\n<div class=\"uk-overflow-container\">\n<table class=\"uk-table uk-table-striped uk-table-condensed uk-text-nowrap\">\n<thead>\n<tr>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<th>Table Heading<\/th>\n<\/tr>\n<\/thead>\n<tfoot>\n<tr>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<td>Table Footer<\/td>\n<\/tr>\n<\/tfoot>\n<tbody>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<tr>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<td>Table Data<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h4 class=\"tm-article-subtitle\">Markup<\/h4>\n<pre><code class=\"xml\"><span class=\"tag\">&lt;<span class=\"title\">div<\/span> <span class=\"attribute\">class<\/span>=<span class=\"value\">\"uk-overflow-container\"<\/span>&gt;<\/span>\r\n    <span class=\"tag\">&lt;<span class=\"title\">table<\/span>&gt;<\/span>...<span class=\"tag\">&lt;\/<span class=\"title\">table<\/span>&gt;<\/span>\r\n<span class=\"tag\">&lt;\/<span class=\"title\">div<\/span>&gt;<\/span><\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>Easily create nicely looking tables, which come in different styles. Usage To apply this component, add the .uk-table class to a table. [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[74],"tags":[],"class_list":["post-3167","post","type-post","status-publish","format-standard","hentry","category-demo"],"_links":{"self":[{"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/posts\/3167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/comments?post=3167"}],"version-history":[{"count":0,"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/posts\/3167\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/media?parent=3167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/categories?post=3167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.internationalbasketballacademy.it\/en_us\/wp-json\/wp\/v2\/tags?post=3167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}