Aerolab / midnight.js

Switch your nav's design on the fly
http://aerolab.github.io/midnight.js/
Other
3.67k stars 380 forks source link

Can't set the header background to transparant #46

Closed cesarcor closed 7 years ago

cesarcor commented 8 years ago

Hi guys,

I was just wondering why can't I make my header element background transparent? e.g.

.midnightHeader.testr{ background-color: transparent; }

The code above will simply not work, the header remains the original color when I reach the testr section.

Thanks and great plugin btw.

RobertoGonzalez commented 8 years ago

Hi @cesardowns Try styling just the .midnightHeader.testr .midnightInner class if you want to set a new background per section. The .midnightHeader class alone does some pre-clipping tasks and will often break if you try to style it directly.

A nicer workaround (so you get a bit more flexibility) is to create a container inside the nav, (like .real-header or something similar), set the background styles there, and leave .midnightHeader and .midnightInner unstyled.