{"action":"closed","issue":{"url":"https://api.github.com/repos/haozhu233/kableExtra/issues/170","repository_url":"https://api.github.com/repos/haozhu233/kableExtra","labels_url":"https://api.github.com/repos/haozhu233/kableExtra/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/haozhu233/kableExtra/issues/170/comments","events_url":"https://api.github.com/repos/haozhu233/kableExtra/issues/170/events","html_url":"https://github.com/haozhu233/kableExtra/issues/170","id":315233723,"number":170,"title":"Add table width example to documentation","user":{"login":"isteves","id":25118334,"avatar_url":"https://avatars2.githubusercontent.com/u/25118334?v=4","gravatar_id":"","url":"https://api.github.com/users/isteves","html_url":"https://github.com/isteves","followers_url":"https://api.github.com/users/isteves/followers","following_url":"https://api.github.com/users/isteves/following{/other_user}","gists_url":"https://api.github.com/users/isteves/gists{/gist_id}","starred_url":"https://api.github.com/users/isteves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isteves/subscriptions","organizations_url":"https://api.github.com/users/isteves/orgs","repos_url":"https://api.github.com/users/isteves/repos","events_url":"https://api.github.com/users/isteves/events{/privacy}","received_events_url":"https://api.github.com/users/isteves/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-17T21:00:48Z","updated_at":"2018-04-19T12:11:09Z","closed_at":"2018-04-19T12:11:09Z","author_association":"CONTRIBUTOR","body":"I was struggling with displaying [some very wide tables](https://nceas.github.io/datateam-training/reference/example-solr-queries.html) properly in my bookdown, particularly since I didn't want to specify an exact width (as shown in the [vignette example](https://datateam.nceas.ucsb.edu/rstudio/help/library/kableExtra/doc/awesome_table_in_html.html)). Eventually I came across the solution of using `kableExtra::scroll_box(box_css = \"overflow-x: auto\")` based on comments in [this Github issue](https://github.com/GitbookIO/gitbook/issues/1626). \r\n\r\nI figured it might be worth adding to the documentation somewhere since I'll probably personally refer to it again, but wanted to run it passed you before doing anything.  Happy to PR if you think it's a good idea!\r\n\r\nFull example: \r\n\r\n```\r\nlibrary(tidyverse)\r\nlibrary(knitr)\r\nlibrary(kableExtra)\r\n\r\ntibble(rownumber = 1:10,\r\n       extra1 = \"some_really_long_file_name\",\r\n       extra2 = \"some_really_long_file_name\",\r\n       extra3 = \"some_really_long_file_name\",\r\n       extra4 = \"some_really_long_file_name\",\r\n       extra5 = \"some_really_long_file_name\",\r\n       extra6 = \"some_really_long_file_name\",\r\n       extra7 = \"some_really_long_file_name\") %>% \r\n  knitr::kable(format = \"html\") %>% \r\n  kableExtra::kable_styling() %>% \r\n  kableExtra::scroll_box(box_css = \"overflow-x: auto\")\r\n```"}}
{"actor":{"display_login":"haozhu233"}}