Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Fixed Navigation at the Top with Fixed Width

Fixed Navigation at the Top with Fixed Width

Scheduled Pinned Locked Moved Web Development
tutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Danzy83
    wrote on last edited by
    #1

    Hello everyone. I've created a navigation menu at the top of the document which is fixed when scrolling. Everything works fine for me on my computer. Now I'm considering that not all persons will open the page with displays as wide as mine. I resized the browser window to be smaller to see the effect. I realised that when the window becomes smaller, navigation menus that do not fall within the length of the visible part of the document wraps to the next line which is outside the coloring of the navigation at the top. I'm looking for a way to force those menus to be shown on a single navigation line so that the user will have to scroll horizontally in order for those menus to be shown. I have set the width of the navigation to 100% to compensate for wide screens. It's left with how to make them appear on the same line but visible on scrolling on small screens. I want to know how to solve this. Thanks in advance.

    J 1 Reply Last reply
    0
    • D Danzy83

      Hello everyone. I've created a navigation menu at the top of the document which is fixed when scrolling. Everything works fine for me on my computer. Now I'm considering that not all persons will open the page with displays as wide as mine. I resized the browser window to be smaller to see the effect. I realised that when the window becomes smaller, navigation menus that do not fall within the length of the visible part of the document wraps to the next line which is outside the coloring of the navigation at the top. I'm looking for a way to force those menus to be shown on a single navigation line so that the user will have to scroll horizontally in order for those menus to be shown. I have set the width of the navigation to 100% to compensate for wide screens. It's left with how to make them appear on the same line but visible on scrolling on small screens. I want to know how to solve this. Thanks in advance.

      J Offline
      J Offline
      Jasmine2501
      wrote on last edited by
      #2

      PLAY with the CSS - without seeing your whole document, I can't give you a guaranteed way to make it work... but it's a combination of overflow: scroll, and possibly white-space: nowrap. You are going to have to experiment with what tags to place those on - that's what doing CSS is about. If you've already made an attempt, you would know we can't give you the answer to this and make sure it will work.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups