4

I have the below qmd file with quarto html option title-block-banner: true. How do I modify the size of the banner to reduce width?

---
title: "Cars"
title-block-banner: true
format: 
  html:
    code-fold: true
    page-layout: full
    fig_caption: yes
---
::: panel-tabset 
## MTCars

```{r}
head(mtcars)

```
## Cars

```{r}
head(cars)

```
:::
apprunner2186
  • 217
  • 1
  • 6

1 Answers1

2

You can do it in this way by modifying the default style:

Qmd-file:

---
title: "Cars"
title-block-banner: true
format: 
  html:
    code-fold: true
    page-layout: full
    fig_caption: yes
---

<style>

#title-block-header {
  margin-block-end: 1rem;
  position: relative;
  margin-top: -1px;
  height: 75px;
}

.quarto-title-banner {
  margin-block-end: 1rem;
  position: relative;
  margin-top: -30px;
  height: 85%;
}

</style>

::: panel-tabset 
## MTCars

```{r}
head(mtcars)

```
## Cars

```{r}
head(cars)

```
:::

Output:

enter image description here

manro
  • 3,529
  • 2
  • 9
  • 22