Comment choisir entre une navigation en position sticky et une navigation en position fixed ?

Par

Camille

October 12, 2024

3 mins

mins de lecture

Sommaire

Partager

La différence entre position fixed et position sticky

En termes simples :

  • position: fixed permet de placer un élément de manière fixe sur l'écran, indépendamment du défilement de la page
  • position: sticky permet à un élément de se comporter comme un élément positionné de manière classique jusqu'à ce qu'il atteigne un certain point lors du défilement, moment auquel il devient fixed.

D'un point de vue plus technique, la position: fixed ancre un élément à un point spécifique de la fenêtre du navigateur, de sorte qu'il reste en place même lorsque l'utilisateur fait défiler la page. Cet élément est retiré du "flux normal du document", ce qui signifie qu'il ne prend pas d'espace dans la mise en page et que les autres éléments s'affichent comme s'il n'était pas là.

En revanche, position: sticky combine les comportements des positions relative et fixed. Un élément avec position: sticky se déplace dans le flux du document normalement jusqu'à ce qu'il atteigne une valeur de défilement spécifiée (par exemple, via top, bottom, left, right), point auquel il devient fixe à l'emplacement spécifié sur l'écran. Cela permet à l'élément de "coller" en place lors du défilement jusqu'à ce qu'il soit dépassé par d'autres contenus.

Comment choisir entre avoir une navigation sticky ou fixed

Vous remarquerez que je ne parle pas des [[Les différentes position possibles en CSS | autres positions possibles en CSS]] car il totalement normal de nos jours de permettre à l'utilisateur d'accéder à tout moment à la barre de navigation, ce qui exclu donc toutes les autres positions.

  • Est-ce que je veux un élément au dessus de ma page
  • Est-ce que je veux un effet de transparence
  • Gestion de l'espace dans les heros / constance avec les autres sections

[[Animations pour cacher et afficher sa barre de navigation au scroll]]

Ce qu'en dis notre cher GPT

Le choix entre une barre de navigation fixed ou sticky dépend de l'expérience utilisateur que vous souhaitez offrir sur votre site ou application web. Voici quelques considérations pour vous aider à choisir :

Utilisation de position: fixed

  • Visibilité constante: Une barre de navigation fixed reste visible à tout moment, ce qui peut être idéal pour les sites où l'accès rapide aux liens de navigation est essentiel, indépendamment de la position de défilement de l'utilisateur.
  • Prévisibilité: Puisqu'elle reste au même endroit, la navigation est toujours accessible au même endroit de l'écran, ce qui peut améliorer l'expérience utilisateur par sa constance.
  • Utilisation de l'espace: En étant toujours affichée, une barre de navigation fixe peut potentiellement réduire l'espace disponible pour le contenu principal, surtout sur les petits écrans.

Utilisation de position: sticky

  • Flexibilité et contexte: Une barre de navigation sticky offre une expérience plus dynamique. Elle se comporte normalement jusqu'à ce qu'elle atteigne un certain point, puis reste visible. Cela peut être utile pour garder une interface propre tout en offrant un accès facile à la navigation lorsque nécessaire.
  • Meilleur pour le contenu long: Pour les pages avec beaucoup de contenu, une barre de navigation sticky peut améliorer l'expérience utilisateur en n'apparaissant que lorsque l'utilisateur commence à faire défiler vers le haut ou atteint un certain point de la page.
  • Adaptabilité: Sur des appareils avec des tailles d'écran limitées, la barre de navigation sticky peut être moins intrusive que la version fixed, car elle n'occupe de l'espace que lorsqu'il est nécessaire.

Considérations supplémentaires

  • Compatibilité: sticky est relativement bien supporté par les navigateurs modernes, mais vérifiez que votre public cible utilise des navigateurs qui le supportent bien.
  • Design et UX: Réfléchissez à l'ensemble de votre design et à l'expérience utilisateur. Une barre de navigation fixe est-elle essentielle pour l'accès à tout moment, ou une barre sticky offrirait-elle une expérience plus fluide et moins intrusive ?

En fin de compte, le choix entre fixed et sticky devrait être guidé par les besoins spécifiques de votre projet, l'expérience utilisateur que vous souhaitez créer, et le type de contenu de votre site. Tester les deux options et recueillir des retours peut également être un excellent moyen de prendre une décision éclairée.

Prenez <contact> avec nous

Nous aimons les challenges

//
Contactez-nous
-
-
->
</style><style data-rc-order="prependQueue" data-css-hash="1his0cd" data-token-hash="himppx">.anticon{display:inline-flex;align-items:center;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-0.125em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.anticon >*{line-height:1;}.anticon svg{display:inline-block;}.anticon .anticon .anticon-icon{display:block;}</style><style>.wf-force-outline-none[tabindex="-1"]:focus{outline:none;}</style><meta charset="utf-8"><title>Portfolio - Codelius</title><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" name="description"><meta content="Portfolio - Codelius" property="og:title"><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" property="og:description"><meta content="Portfolio - Codelius" property="twitter:title"><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" property="twitter:description"><meta property="og:type" content="website"><meta content="summary_large_image" name="twitter:card"><meta content="width=device-width, initial-scale=1" name="viewport"><link href="https://cdn.prod.website-files.com/62d15fe5fc13096216837c9f/css/lamrx.webflow.b445a3420.css" rel="stylesheet" type="text/css"><link href="https://fonts.googleapis.com" rel="preconnect"><link href="https://fonts.gstatic.com" rel="preconnect" crossorigin="anonymous"><script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,regular,500,700%7CIndie+Flower:regular" media="all"><script type="text/javascript">WebFont.load({  google: {    families: ["Poppins:300,regular,500,700","Indie Flower:regular"]  }});</script><!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif]--><script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script><link href="https://cdn.prod.website-files.com/img/favicon.ico" rel="shortcut icon" type="image/x-icon"><link href="https://cdn.prod.website-files.com/img/webclip.png" rel="apple-touch-icon"><!-- Google tag (gtag.js) -->
<!--
</style><style data-rc-order="prependQueue" data-css-hash="1his0cd" data-token-hash="himppx">.anticon{display:inline-flex;align-items:center;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-0.125em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.anticon >*{line-height:1;}.anticon svg{display:inline-block;}.anticon .anticon .anticon-icon{display:block;}</style><style>.wf-force-outline-none[tabindex="-1"]:focus{outline:none;}</style><meta charset="utf-8"><title>Portfolio - Codelius</title><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" name="description"><meta content="Portfolio - Codelius" property="og:title"><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" property="og:description"><meta content="Portfolio - Codelius" property="twitter:title"><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" property="twitter:description"><meta property="og:type" content="website"><meta content="summary_large_image" name="twitter:card"><meta content="width=device-width, initial-scale=1" name="viewport"><link href="https://cdn.prod.website-files.com/62d15fe5fc13096216837c9f/css/lamrx.webflow.b445a3420.css" rel="stylesheet" type="text/css"><link href="https://fonts.googleapis.com" rel="preconnect"><link href="https://fonts.gstatic.com" rel="preconnect" crossorigin="anonymous"><script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,regular,500,700%7CIndie+Flower:regular" media="all"><script type="text/javascript">WebFont.load({  google: {    families: ["Poppins:300,regular,500,700","Indie Flower:regular"]  }});</script><!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif]--><script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script><link href="https://cdn.prod.website-files.com/img/favicon.ico" rel="shortcut icon" type="image/x-icon"><link href="https://cdn.prod.website-files.com/img/webclip.png" rel="apple-touch-icon"><!-- Google tag (gtag.js) -->
<!--
</style><style data-rc-order="prependQueue" data-css-hash="1his0cd" data-token-hash="himppx">.anticon{display:inline-flex;align-items:center;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-0.125em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.anticon >*{line-height:1;}.anticon svg{display:inline-block;}.anticon .anticon .anticon-icon{display:block;}</style><style>.wf-force-outline-none[tabindex="-1"]:focus{outline:none;}</style><meta charset="utf-8"><title>Portfolio - Codelius</title><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" name="description"><meta content="Portfolio - Codelius" property="og:title"><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" property="og:description"><meta content="Portfolio - Codelius" property="twitter:title"><meta content="Venez voir notre travail, et les avis de ceux qui nous ont fait confiance avant vous... Mais attention, l'essayer c'est l'adopter !" property="twitter:description"><meta property="og:type" content="website"><meta content="summary_large_image" name="twitter:card"><meta content="width=device-width, initial-scale=1" name="viewport"><link href="https://cdn.prod.website-files.com/62d15fe5fc13096216837c9f/css/lamrx.webflow.b445a3420.css" rel="stylesheet" type="text/css"><link href="https://fonts.googleapis.com" rel="preconnect"><link href="https://fonts.gstatic.com" rel="preconnect" crossorigin="anonymous"><script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,regular,500,700%7CIndie+Flower:regular" media="all"><script type="text/javascript">WebFont.load({  google: {    families: ["Poppins:300,regular,500,700","Indie Flower:regular"]  }});</script><!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif]--><script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script><link href="https://cdn.prod.website-files.com/img/favicon.ico" rel="shortcut icon" type="image/x-icon"><link href="https://cdn.prod.website-files.com/img/webclip.png" rel="apple-touch-icon"><!-- Google tag (gtag.js) -->
<!--
5/5

Our clients say it best

We might not be the most objective judges of our own work,
but they certainly are.

The advantages of working with Codelius: responsiveness, flexibility, and rigor.

Mathieu

CEO @ hyffen

Codelius are exceptional - professional, highly skilled, and genuinely driven to deliver outstanding results. They have been integral to the development of our site, bringing real value through advanced prototyping and thoughtful execution. We truly consider them an extension of our team.

Juliet Clark

Head of Product, BoxMedia

Working with Codelius was a fantastic experience. Camille is a true expert with extensive knowledge and experience in Webflow. The collaboration was always on an equal footing and the communication was easy and fun. I really valued her initiative in providing feedback on design ideas and her intention to establish a solid color and component structure behind the design. I learned a lot from our collaboration and would choose Codelius again anytime.

Isabell H.

Senior Product Designer

Working with Camille was really easy. We used a Google Doc and WhatsApp and only needed one quick video call. I was very happy with the price and the quality of the site.

Chris Tyler

Founder @ Search Party Capital

Camille is so good that I almost don’t want to recommend her — I’d rather keep her for myself. Everything was smooth, fast, and incredibly efficient. Clearly above my expectations, with a brief that she understood perfectly even though I provided very few details. A real gem.

Basptiste W.

CEO @ uRoot

[…] Codelius was able to meet this need by delivering fast and clean results. When we had more advanced requirements, […] they went beyond the technology itself to create a custom solution. They remained available and supportive, answering our questions and helping us take everything in hand.

Grégoire G.

CEO @ Albert School

From design to development, the result is exactly what we wanted, and it’s truly beautiful. We are thrilled with the project. On the development side — implementing the design — Camille showed remarkable patience and flexibility to ensure I obtained the pixel-perfect result I had in mind. Hats off to Camille.

Jeff

Manager @ Relookitchen

Camille is the person you need for your Webflow, Airtable, and other no-code tools projects. She is professional, attentive, and delivers work of excellent quality. I recommend her without hesitation.

Sébastien P.

Manager @ Professional Magician

Camille and the Codelius team delivered exactly what we needed in a timely manner — she was a pleasure to work with and we look forward to working with them again in the future.

Tessa

Co-Founder @ Pipeline Solution

Working with Codelius agency and Camille was actually made IT fun, not stressful. She has a unique combination of getting the high level design, giving experienced inputs, the French artistic touch and ability to implement low level custom solutions. At the end of the project I wished she was a colleage. Hope to work with her again one day.

Adam M.

Operations Manager & BI Analyst @ Nordlux Australia

Nous sommes certifiés experts par Webflow eux-même depuis 2020. Il s’agit de notre outil de prédilection, avec Webflow nous pouvons faire des merveilles !

Nos développements Webflows prennent majoritairement leurs base depuis une maquette Figma. Elle permet à nos clients de valider un design avant de le concevoir.

Nous sommes partenaires d’une agence de webdesign pour combiner nos savoirs-faire et proposer à nos clients la meilleure option pour leurs projets les plus fous.

WHY ?
HOW ?

Your questions, answered

Why shouldn't I just make an app with an AI builder instead ?

AI and Webflow aren’t magic solutions — they’re tools. Powerful tools, yes, but tools nonetheless.
At Codelius, we use both every day, not as all-in-one answers but as accelerators.

If you want something reliable, scalable, and truly tailored to your business, humans still need to do most of the work.
AI can generate ideas, drafts, or components, but it cannot replace thoughtful architecture, UX decisions, technical consistency, or long-term maintenance.

In short: AI can speed things up, but human expertise is what makes a product last. We combine both — never one without the other.

Are you certified Webflow experts ?

Yes. Our team has been officially certified on Webflow since early 2022.

We continuously stay up to date with the platform’s best practices, new features, and evolving standards.
This allows us to deliver projects that are reliable and scalable, and to provide training sessions that reflect the most current, high-quality Webflow knowledge available.

How many people are on the Codelius team?

We are a small and nimble team of three Webflow experts. Each of us have our own specialties, including custom development, design and project management.

When needed, we also collaborate with a small network of trusted partner agencies and expert freelancers to handle specific technical requirements or high-volume periods.
However, your experience remains simple and streamlined: you will always work with one dedicated point of contact, and we take care of everything else behind the scenes.

How long does development take?

It depends on the scope of your project — the size of the site, the level of complexity, the animations, the presence of advanced features, and the materials you can provide (designs, images, brand guidelines, etc.).

But since “it depends” is not a satisfying answer, here are realistic timeframes based on the types of projects we handle.


• Website with ready-made designs

Starting from 15 days of development.

• Website created with low-cost, AI-assisted design

Starting from 3 weeks (design + development).

• Website with professional, hand-crafted design

(Designed by a partner agency)

Starting from 1 month (design + development).

• Webflow web application (user accounts, custom features)

Starting from 1 week when built on top of an existing website.

More advanced features can extend the timeline to several months.

• Native or complex React applications

Designed and developed entirely from scratch.

Timelines are provided on a case-by-case basis, but rarely under 3 months from initial conception to production release.

Every project has its nuances. The most reliable way to define a precise timeline is to tell us what you want to build so we can assess the scope and provide a clear, realistic schedule.