Skip to content
Discussion options

You must be logged in to vote

By inspecting the DOM and removing suspicious-looking classes, I can tell that (unsurprisingly) it's the btn class that's causing issues.

Here's a hack to get you unstuck:

---
title: "test-button-navbar"
---

```{=html}
<style>
    .menu-text:not(.btn) {
        margin: 0.375rem;
        position: relative;
        top: 0.375rem;
    }
    .menu-text.btn {
        top: inherit;
    }
    li.nav-item span.btn.btn-primary {
        position: relative;
        top: -0.375rem;
    }
</style>
```

This is a Quarto website.

To learn more about Quarto websites visit <https://quarto.org/docs/websites>.

It's not an entirely trivial thing for us to fix in pure CSS because the padding in .btn is w…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cscheid
Comment options

Answer selected by juliasilge
@mcanouil
Comment options

mcanouil Mar 3, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
html Issues with HTML and related web technology (html/css/scss/js) themes Related to HTML theming or any other style related issue (like highlight-style)
3 participants