How do you choose between sticky and fixed position navigation?

By

Camille

October 12, 2024

-

3 mins

minutes of reading

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

We love a challenge

//
Contact us
-
-
->
</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) -->
<!--

What our customers have to say

Admittedly, we're not very objective about our prowess,

but them... Yes !

The communication was always nice, considerate, and warm. Camille gave honest feedback on some of my ideas and suggested ways to improve them. She was always open to feedback and took it well. I also found the technical quality, project structure, and animations excellent.

Isabell Hergoz

Founder

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 collage. Hope to work with her again one day.

Adam M.

Operations Manager & BI Analyst

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

Camille is the right person for your webflow, airtable and other nocode projects. She's professional, a good listener and does high-quality work. I recommend her without hesitation!

Sébastien Pieta

Manager

Great, we're super happy to receive the site so we can make the returns, thank you very much!

[...] At first glance, we're very happy!

Constantin R.

Co-founder

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

Mathieu

CEO

From design to development, the result is exactly what we wanted, and it's really very beautiful. We're delighted with the project. On the dev side - setting up the design - Camille was superbly patient and flexible in making sure I got the desired result down to the pixel. Hats off to Camille!

Jeff

Manager

[...] Codelius was able to meet this need, offering us fast, clean results. When we needed something a little more advanced, [...] they went beyond technology to create a custom solution! They were always on hand to answer our questions and help us get the hang of things!

Grégoire G.

CEO

Camille is so strong that I won't recommend her, I want to keep her all to myself ;p Super fluid, fast and devilishly efficient. Clearly above my expectations and perfectly briefed with very little to go on. A nugget!

Basptiste W.

CEO

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

We've been certified experts by Webflow themselves since 2020. It's our tool of choice, with Webflow we can do wonders!

Most of our Webflows developments are based on a Figma model. It enables our customers to validate a design before conceiving it.

We partner with a web design agency to combine our know-how and offer our customers the best option for their wildest projects.

why?
how?

We answer your questions

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Contact us

Are you Webflow experts?

Yes! ✨

Camille, our head trainer, has been a certified Webflow expert since January 2022 🤩

Since then, she has continued to update herself with new best practices to make sure she trains you to the best of her ability.

How many people will be working on my project?

There are several of us in the company, and we each have our own specialities 👀

We will choose who will be in charge of your project depending on the requests you have, but in any case, you will never be in contact with more than two people, to avoid loss of information and time 🙌

Of course, if you request it, you will be able to meet the inner workings of the machine 🙊

How many people work for Codelius?

There are currently two of us! A couple of entrepreneurs, united by the desire to do our best every day, but also to become the best versions of ourselves.

During your projects, you'll probably only be in touch with me, the site's little voice, aka Camille 😉 Geoffrey prefers to stay in the shadows 🙊

Do you work well?

As best we can!

We are committed to providing quality and easy-to-use solutions for our customers over time 🙌

How long does development take?

The development time depends on the project you wish to carry out (size of the site, advanced functionalities or not, application, etc), and on the resources you are able to provide (models, images, logo, graphic charter, etc) ✨

But since we know that "it depends" is not a satisfactory answer, here are a few pointers to help you determine the duration of your project ✌️

  • Website project with mock-ups already created by a designer, simple arrival animations: approx. 15 days development time
  • Website project with designs created directly on Webflow: approximately 1 month of design and development.
  • Simple application (customer account and a few functions) with mock-ups already created by a designer: approx. 2 months' development time
  • Complex application (customer account and numerous functions) with mock-ups already created by a designer: approx. 4 months' development time
  • Simple and complex applications with designs created directly on Webflow: between 4 and 6 months' development time

The best way to find out how long your project will last is to contact us and tell us all about it , and that's over here! 👇