Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Navbar fixed on top on scrolling?


piernas

Recommended Posts

Today I've just noticed the navbar scrolls with all other content. I was expecting that it should seat on top and stay visible when scrolling the page content. Should not this be the default behavior for a navbar?

Link to comment
Share on other sites

The stock Bootstrap navbar scrolls with the content, but there is supposed to be an option that allows you to make it sticky.

 

Edit: Dead easy: Just add the navbar-fixed-top class to the container. I should add this to my Modular Navbar package. Thanks for the idea.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

That's a good reference @@Dan Cole. Why couldn't Google give me that whan I asked, instead of making me go look at page source? Bad Google. No cookie.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Be careful about making pieces of the screen "sticky" (non-scrolling). You don't want that on an "xs" display (such as a phone), and possibly on some larger displays. You don't want to cover up too much of the screen and make your page unusable. Anyway, don't unconditionally make something fixed (pinned) unless you're displaying on a large enough device.

Link to comment
Share on other sites

Be careful about making pieces of the screen "sticky" (non-scrolling). You don't want that on an "xs" display (such as a phone), and possibly on some larger displays. You don't want to cover up too much of the screen and make your page unusable. Anyway, don't unconditionally make something fixed (pinned) unless you're displaying on a large enough device.

 

I did of the test of the proposed code for the navbar in responsive, for my smartphone I didn't find it intrusive. In XS the navbar test only shows the shop name and the hamburger button. So having it present all the time top (or bottom) wasn't a negative for me. Granted, others may not have the same opinion.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

The navbar is indeed responsive and you can hide some of the items that appear on the bar or order up a hamburger :lol: as you move to smaller screen sizes.  I've had a fix navbar so the better part of a year...it is a great way to keep items on the screen for easy access.

 

Dan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...