How can we deal with layers in Tailwind CSS

Syed Usman Hassan

This is a landing page Landing Page Website Raact.

When I scroll down my slider came on front of navbar which is displayed in the bottom image Error in this Part. So please help me to out to put slider in the back of navbar.

I want the slider to be below the navbar on scroll on on the above of it. I have kept the navbar fixed.

Jake

If you are using position: fixed with an HTML structure something like this...

<body>
 <header style="position: fixed"/>
 <main> 
   <!-- rest of your scrollable content> 
 </main>
</body>

You can just swap the order of your header and main elements:

<body>
 <main> 
   <!-- rest of your scrollable content> 
 </main>
 <header style="position: fixed"/>
</body>

Since the <header> is now later in the DOM structure, it will inherently have a higher z-index, and so will appear on top of the <main> content. And since you are using position: fixed, the location of the element on the page won't really change.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can we deal with NULL values that have specific meanings?

How can we deal with large number in vb.net

how can i customize container width in tailwind-css?

How can image view through the hollow text in tailwind css

How can I change the underline color in tailwind css

How can I align image horizontally in tailwind-css

How can I center an image inside a table using Tailwind CSS?

How can I space out elements in a navbar with Tailwind CSS?

How can I stabilize floating labels in React using Tailwind CSS?

Css can´t find tailwind

How to group clases in CSS - Tailwind

how to use calc() in tailwind CSS?

How to use SCSS with Tailwind css?

How can we make this shape using CSS

How we can deal with large number of category present in a column around 300K. in Preprocessing Data?

How can we deal with other web applications in shared domain improperly scoping cookies to parent domain?

Using tailwind css or just vanilla css how can i create a radiating effect on a menubar?

how do we deal with not knowing the prefix/namespace?

Can I style the SurveyJs forms with tailwind css?

Tailwind CSS can not configure correctly placeholder

Tailwind.css — How to implement the last-child using Tailwind?

how to deal with suffix and prefix in css

How can I center the second row vertically in an up-and-down carousel using Tailwind CSS?

how can I achieve text color of rgba(0, 0, 0, 0.54) tailwind css?

How can I align image horizontally in tailwind-css in Laravel breeze

How can I use tailwind-css to style the active state of the Navlink(react-router-dom)?

How to give margin top in tailwind css to a image?

how to make a table scrollable with html + Tailwind CSS

Tailwind CSS how to style a href links in React?