### Bug description

column-margin contents have arbitrary and broken placement if used within panel-tabset

Probably related to closed [issue](https://github.com/quarto-dev/quarto-cli/issues/2341 )

Anecdotally, margin height seems to be set relative to the tab's contents, and then moved lower, and lower, until it trails off onto content below. In my use case I have tabsets stacked down a page and so margin contents end up escaping one tabset and overlapping another lower one, especially with contents that are different sized images. Reproduced on both chrome and Firefox, but have seen intermittent correct alignment on Firefox that then breaks when moving through toc links.

![image](https://user-images.githubusercontent.com/3146793/201207765-01c457b0-b5de-4e49-a870-f5434d5ee508.png)

![image](https://user-images.githubusercontent.com/3146793/201207784-ad72563b-a061-4a88-80a3-09e32f69185c.png)

```
---
title: "column-margin Misplacement in panel-tabset Reproducible Example"
format:
  html
---

# Header 1

::: {.panel-tabset}

### Subheader 1

::: {.column-margin}
Margin Text 1
:::

<!-- ![](https://quarto.org/docs/gallery/articles/advanced-layout-pdf.png) -->

### Subheader 2

::: {.column-margin}
Margin Text 2
:::

::: 
```

Happened with latest stable build and currently with nightly
quarto -v
99.9.9

`
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.2.2  fastmap_1.1.0   cli_3.4.1       htmltools_0.5.3 tools_4.2.2     rstudioapi_0.14 yaml_2.3.6      rmarkdown_2.17  knitr_1.40      xfun_0.34       digest_0.6.30   rlang_1.0.6     evaluate_0.17 
`

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2022-11-10T21:27:16Z
rexdouglass
bug articles
v1.3
closed
column-margin Misplacement in panel-tabset
https://github.com/quarto-dev/quarto-cli/issues/3280