<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-i-made-the-slide-in-nav-on-my-website-prjgeffao" -->

---
title: How I made the slide in nav on my website | daily.dev
description: A walkthrough of implementing a slide-in sticky navigation using modern CSS features like container scroll-state queries and scroll-driven animations. The...
canonical: https://daily.dev/posts/how-i-made-the-slide-in-nav-on-my-website-prjgeffao
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How I made the slide in nav on my website | daily.dev
og:description: A walkthrough of implementing a slide-in sticky navigation using modern CSS features like container scroll-state queries and scroll-driven animations. The...
og:url: https://daily.dev/posts/how-i-made-the-slide-in-nav-on-my-website-prjgeffao
og:image: https://api.daily.dev/og/posts/PRjgEffAo.png
og:image:alt: How I made the slide in nav on my website
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How I made the slide in nav on my website

**[Kevin Powell](https://daily.dev/sources/kevinpowell)** · 17 min read · 2 upvotes · 0 comments

## Summary

A walkthrough of implementing a slide-in sticky navigation using modern CSS features like container scroll-state queries and scroll-driven animations. The tutorial demonstrates two approaches: one using `container-type: scroll-state` with `stuck` detection (newer, less supported), and another using scroll-driven animations with animation timelines (slightly better browser support at ~78% vs 71%). The CSS-only solution replaces a previous JavaScript implementation, showing how to create progressive enhancements with position sticky, transforms, and transitions.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=6LJuWf4ySCI>

## Similar posts on daily.dev

- [Toggle \`position: sticky\` to \`position: fixed\` on Scroll – Frontend Masters Blog](https://daily.dev/posts/toggle-position-sticky-to-position-fixed-on-scroll-frontend-masters-blog-lhdc6i72d) · Frontend Masters · 7 upvotes · 0 comments
- [Scroll-driven CSS animations](https://daily.dev/posts/scroll-driven-css-animations-uw6plcluy) · Flavio Copes · 142 upvotes · 6 comments
- [Scrollytelling on Steroids With Scroll-State Queries](https://daily.dev/posts/scrollytelling-on-steroids-with-scroll-state-queries-sbctcignf) · CSS-Tricks · 4 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#javascript](https://daily.dev/tags/javascript), [#css](https://daily.dev/tags/css), [#astro](https://daily.dev/tags/astro)

[View this post on daily.dev](https://daily.dev/posts/how-i-made-the-slide-in-nav-on-my-website-prjgeffao)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How I made the slide in nav on my website","url":"https://daily.dev/posts/how-i-made-the-slide-in-nav-on-my-website-prjgeffao","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-i-made-the-slide-in-nav-on-my-website-prjgeffao"},"datePublished":"2026-02-11T14:11:52.563Z","dateModified":"2026-02-11T14:12:12.741Z","description":"A walkthrough of implementing a slide-in sticky navigation using modern CSS features like container scroll-state queries and scroll-driven animations. The...","image":"https://i.ytimg.com/vi/6LJuWf4ySCI/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/6LJuWf4ySCI/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Kevin Powell","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Kevin Powell","logo":"https://media.daily.dev/image/upload/s--XK5Rf0kM--/f_auto/v1717745137/logos/kevinpowell","url":"https://daily.dev/sources/kevinpowell"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-i-made-the-slide-in-nav-on-my-website-prjgeffao","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,javascript,css,astro","timeRequired":"PT17M","video":{"@type":"VideoObject","name":"How I made the slide in nav on my website","description":"A walkthrough of implementing a slide-in sticky navigation using modern CSS features like container scroll-state queries and scroll-driven animations. The...","thumbnailUrl":"https://i.ytimg.com/vi/6LJuWf4ySCI/sddefault.jpg","uploadDate":"2026-02-11T14:11:52.563Z","duration":"PT17M","url":"https://api.daily.dev/r/PRjgEffAo","embedUrl":"https://www.youtube.com/embed/6LJuWf4ySCI"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Kevin Powell","item":"https://daily.dev/sources/kevinpowell"},{"@type":"ListItem","position":3,"name":"How I made the slide in nav on my website"}]}
```

