Creating a shrink-nav...

User 122279 Photo


Senior Advisor
14,650 posts
Online Now

I have been struggling for days trying to make a shrink nav with RSD or one of the other 'R' apps. I have not been successful so far, among other things because there are things you can't do in RSD, like e.g. setting various elements to position inline-block and at the same time floating it. The navigation in my attempt had to be positioned with flex, and I wonder if that messes up the result.

I'm adding my struggles here, along with the files from Code Pen that I was using as a model. Since all the shrink-nav instructions I have seen are based on desktop first, I have tried RSD with coffeegrinder. You will see that the logo is behaving as it is supposed to, but not the rest of the head section. Can someone take a look and maybe find out what I have done wrong?
https://dl.dropboxusercontent.com/u/109100033/basic.zip
The contents below the header is just something to fill the page with.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,271 posts

They look pretty much the same to me or I'm not understanding what your after.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2846109 Photo


Ambassador
341 posts

Do you have working example from another site you could share a link to, Inger?
http://www.pixelandpoly.com/ (built with Bootstrap Builder)
Video Tutorials - https://www.youtube.com/channel/UCQMcF0 … EKA/videos
The Universe from A to Z - https://universeatoz.com/ (built with Foundation Framer)
User 244626 Photo


Registered User
811 posts

Have a look at this it may just need some css reset but functional. I moved everything down one adding a container away from the row.

I also repasted the css from the codepen so there might have been a error in there.....?

I think this is the link to codepen ?

https://codepen.io/lili2311/pen/dJjuL

Attachments:
Bootstrap 5 CSS Grid.
User 122279 Photo


Senior Advisor
14,650 posts
Online Now

Eric Rohloff wrote:
They look pretty much the same to me or I'm not understanding what your after.


Take a look at the code pen link that Twinstream posted. That is the one I'm trying to put into RSD. You see that the whole header area should get smaller on scroll, not just the logo.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,650 posts
Online Now

Jeff wrote:
Do you have working example from another site you could share a link to, Inger?


Here is another one that I have tried in RSD mobile first without succeeding. I may try to create it with desktop first.
http://callmenick.com/post/animated-res … -on-scroll
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,650 posts
Online Now

Twinstream wrote:
Have a look at this it may just need some css reset but functional. I moved everything down one adding a container away from the row.

I also repasted the css from the codepen so there might have been a error in there.....?

I think this is the link to codepen ?

https://codepen.io/lili2311/pen/dJjuL



It is the right code pen. I have also tried copying the original files, and that works. But in RSD I'd call that cheating... ;)

One of the things I'm wondering about is the way I positioned the nav bar. I had to use flex, because there were bits in the original css that I wasn't able to do in RSD. Maybe that is causing a problem. I noticed that the navbar disappeared in your file.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 244626 Photo


Registered User
811 posts

I was questioning if a wrapper could be designated on a row. Should it not be a column or a container that the js-header is contained in ?
Bootstrap 5 CSS Grid.
User 122279 Photo


Senior Advisor
14,650 posts
Online Now

You might be right there, Twinstream. I'll make a new attempt... ;)
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,271 posts

You need to overide the height line 73 main.css
body > .row > #js-header[class*="coffee-span-"] {
position: fixed;
top: 0;
left: 0;
z-index: 999;
overflow: hidden;
min-height: 20px;
max-height: none;
height: 10em;
border-bottom: 8px solid #f4f4f4;
background-color: #394e63;
-webkit-transition-duration: .3s;
-moz-transition-duration: .3s;
-o-transition-duration: .3s;
transition-duration: .3s;
-webkit-transition-property: height;
-moz-transition-property: height;
-o-transition-property: height;
transition-property: height;
}
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.