Prevent wrapping of menu items

后端 未结 6 1752
面向向阳花
面向向阳花 2020-12-24 02:00

I created a horizontal navigation (menu) bar for my site. When I re-size my window to a size smaller than that of the bar, the menu items get wrapped. I want the menu to rem

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 02:17

    im assuming these are you nav bar items

  • Home
  • Tech Specs
  • Fun
  • Deals
  • Wheelz
  • About
  • if you just put them like this

  • Home
  •  
  • Tech Specs
  •  
  • Fun
  •  
  • Deals
  •  
  • Wheelz
  •  
  • About
  • thats all you have to do is join them all together with no spaces between the li end and start tags, now that would display them all in line with no spaces visually between your nav items on your loaded page, so you might not want them all to be visually joined like its one bar, so iv also put a code for a space in between the li end and start tags, this will give you a single space between all nav tags visually on your loaded screen but they will still stay tied together so that wont go staking up if you make screen narrow.

提交回复
热议问题