'position: fixed' query - survey form

On my survey form, I set the position of the title to ‘fixed’. Now the title is below the description that says ‘Please take a few minutes of your time to fill out the survey…’

How do I put the title at the top of the page, keeping the position as fixed?

This is the link: https://codepen.io/IkeaFlowers/pen/ExvjOOd

position: fixed , z-index: position (integer value ex: 10 or -10 (negative values means ‘behind’). Read about it z-index - CSS: Cascading Style Sheets | MDN.

From what I understand, position:fixed; takes that element out of the document flow which can cause the overlap issue.
How I fixed:

#description { margin-top: 75px;} //add - bumps down everything else
#title {top:0;} //add to existing - places your fixed to the top

1 Like

Hi @lisalittleindia,
I had the same problem and I solved it like that:

#title {
  top: 0;
  width: 100%;
  position: fixed;
}

I hope I was helpful :wave:

1 Like

also don’t forget to set margin-top on the element under the title (#description) to avoid overlapping.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.