song.xiao
song.xiao

Reputation: 179

How to set header not to be transparent using css?

I've bulit my own website using Hugo theme.

this is a post: https://xsong.ltd/zh/model/

The problem is the header will be transparent when float on top of LATEX equation:

enter image description here

this is css style for header:

.header{
top:0px;
position:fixed;
padding:15px 0;
} 

.header{
width:100%;
background:#BEBEBE;
border-bottom:1px solid #ADADAD;
box-shadow:0px 0.12rem 0.25rem 0px #adadad;
} 

I want deprecate this, e.g., make the navigation header never be transperant to all elements. How to modify my css code?

Upvotes: 0

Views: 69

Answers (1)

user125661
user125661

Reputation: 1568

You could use z-index for this. Apply it to the .header. Read more.

Upvotes: 2

Related Questions