changing navbar color for other pages using brooklyn theme

Solved
Excursionist
21 0 2

Hello, so recently i have position fixed my navbar for the homepage. so basically when using brooklyn theme in homepage, the navbar for it doesn't seem to need a background color to it because of my slider. however my next page for my brooklyn, the navbar overflows the text and i want to add color. but every time I put a color for CSS. it also adds color to my homepage. how should i code my navbar for other pages? 

 

new to liquid. 

 

here's my url: https://0lwj2it92hmewhdp-25472335924.shopifypreview.com

 

i appreciate help :) 

 

 

*so this is my homepage, which perfect already.

 

home.JPG

 

 

 

 

*and the navbar for my other pages is my problem.
page.JPG

0 Likes

Success.

Shopify Expert
165 40 66

@lykaninja

 

Easiest solution would be adding this to your theme.scss.liquid file: 

 

.template-index .header-wrapper {
  background: transparent; 
}

.header-wrapper {
  background: #ffffff; 	
}

Go to Online Store > Themes > Actions > Edit Code. Go to the Assets folder > theme.scss.liquid and paste that at the bottom. 

Did I provide you with a working solution? Give me an Approved Solution!

Likes are appreciated as well :)
1 Like
Excursionist
21 0 2

ohhhh thank you so much!!! i didn't understand much on how did you come up with template-index. I'd appreciate if you could explain also. but anyway, it worked! Thank you so much with this one. 

0 Likes
Shopify Expert
165 40 66
You can target specific pages to only apply the css for that specific page. Examples:

.template-product (will affect all product pages)
.template-collection (will affect all collection pages)
.template-page (will affect all pages)
.template-index (homepage only)

Thanks!
Did I provide you with a working solution? Give me an Approved Solution!

Likes are appreciated as well :)
2 Likes
Excursionist
21 0 2

thank you so much for the guide!!! :) 

0 Likes
New Member
1 0 1

Thank you so much for this - I have been looking for this info for two days now. You've given us some really good pointers, will bookmark your response! Thanks.

1 Like