Survey, How to: full width fixed header

Hey there, i’m going thorugh this project and i want to add some style of my own; i-m trying to add this full width fixed header but im getting a little space on top left :confused:

Also, is there any way to create a big fixed mask so the form content can be dragged inside that mask (the header stills there with no background box, but the survey hides behind it). If so, just tell me the keys and i’ll further investigate. As a game dev i would use a mask behind the header to cover the dragging main content, or 2 cameras to show different stuff but it seems that’s not the way here :slight_smile:

PS: the project still WIP, just completed the main goals but need some css fixes.

Browser: Firefox 78.0.2 (64-bit)

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0.

Challenge: Build a Survey Form

Link to the challenge:


hey @juan.m.pais,

for your header add left:0; to the c lass.

I dont know what you mean by big fixed mask? is that something to do with game development? the concept doesn’t ring a bell sorry im not used to the terms

1 Like

left:0; worked flawlessly!

Sorry for the mask thing, indeed i’m game dev related and spanish speaker, super noob here so still missing the accurate terms.

I’ll try to describe what i would like to achieve:

background image in the entire page - done.
fixed header on top with no color background, plain text over the image - done.
when i scroll down the main content of the page, it will hide behind the header, just like if the header had an mask behind it that will cover the main content but won’t affect background image - no clues.

Thanks for your help!

ok so the page already does this bit.

but this part - like if the header had an mask behind it that will cover the main content i dont understand sorry mate, do you mean make it transparent or something? is there an article that you can show me that will show what this masking is maybe that will help cuz thats what throwing me off , for me the page header is moving over the main content and the background image stays still this sounds like what your describing that you want to happen as the background image is not being affected.

hides behind the header

Imagine the black box doesn’t exist; but the main content keep disappearing behind that box .

Can’t find a better way to explain it with my actual knowledge about web dev and english lang :sweat_smile:


the thing is thats what a fixed header is meant to do, everything on the page goes under it, if you want the content on the page to go over the top of it, give your header a z-index: -1;

a z index is just a way to order things from front to back so adding -1 will put it behind everything or you could put other content to z index 1 or 2 or 3 if you know what i mean, but in order to add a z-index to a element its needs to have a position of relative, absolute or fixed .

i hope this is the thing your asking mate lol.

I’ll read further and keep improving :smiley: Thanks for your time pal!

1 Like