Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float TOC issues with scrolling #798

Open
xtmgah opened this issue Sep 7, 2016 · 2 comments
Open

Float TOC issues with scrolling #798

xtmgah opened this issue Sep 7, 2016 · 2 comments
Labels
bug an unexpected problem or unintended behavior theme: bootstrap related to bootstrap

Comments

@xtmgah
Copy link

xtmgah commented Sep 7, 2016

Hello:
when I have HTML documents where I can scroll sideways/horizontal (happens with wide tables, etc), the floating TOC stays fixed on the screen, and not fixed relative to the content. It’s then hidden behind code boxes and everything else that is transparent.

@yihui yihui added this to the v1.8 milestone Oct 16, 2017
@yihui yihui modified the milestones: v1.8, v1.9 Nov 15, 2017
@yihui yihui modified the milestones: v1.9, v1.10 Mar 4, 2018
@yihui yihui modified the milestones: v1.10, v1.11 Jun 15, 2018
@rich-iannone rich-iannone added bug an unexpected problem or unintended behavior Difficulty: Advanced labels Jun 19, 2018
@yihui yihui changed the title Float doc issues with scrolling Float TOC issues with scrolling Jun 25, 2018
@yihui yihui removed this from the v1.11 milestone Jun 25, 2018
@atusy
Copy link
Collaborator

atusy commented Jul 21, 2020

This seems to be a tough issue to solve.
A workaround would be applying a CSS rule to the elements that might overflow.
For example,

p {overflow-x: auto}

reprex

---
title: test
output:
  html_document:
    toc: true
    toc_float: true
---

```{css}
p {overflow-x: auto}
```


# foo

## bar

### buz

```{r, out.extra='style="width:50cm; max-width:50cm"'}
plot(iris)
```

@cderv cderv added the theme: bootstrap related to bootstrap label Jan 12, 2022
@cderv
Copy link
Collaborator

cderv commented Jan 12, 2022

It would be easier to style such content if we can target output part from chunk. Applying overflow auto to any <p> may be too much, but that indeed works.

This could help for styling: #2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior theme: bootstrap related to bootstrap
Projects
None yet
Development

No branches or pull requests

5 participants