Currently, I am using Nuxt and have a header layout for my navigation that has a white background color.
However, on a specific page, I would like to change the navigation background color to be transparent (only for this page).
I have attempted a few solutions:
The following code makes the background transparent for all pages (which is not what I want):
<style lang="css">
nav {
background-color: rgba(0, 0, 0, 0);
}
This solution does not work because the nav element is included from the Nuxt layout and not present on this particular page:
<style lang="css" scoped>
nav {
background-color: rgba(0, 0, 0, 0);
}
I have also tried using !important, but it did not achieve the desired result.
Does anyone have any suggestions other than creating a new layout with a transparent header?