Ask a questionAsk a question
 

Answertop nav bar word wrap?

  • Monday, September 17, 2007 5:16 PMBob Sieloff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Greetings,

     

    Is it possible to wrap the titles of the top nav bar tabs?  I have a lot of tabs and several are unfortuanely long, like "evironmental department".  I would love to shorten the names but again, unfortuneatly " Politics always trumps common sense".   Therefore, I'm wondering if there is a way to modify the nav bar tabs to wrap at 15 characters.

     

    Thanks for your help

    -Bob

Answers

  • Monday, September 17, 2007 10:34 PMRandy DrisgillMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    In your SharePoint:AspMenu in the masterpage try adding ItemWrap="true". This should force long items to wrap and then you just have to adjust css to make it look nicer.

     

All Replies

  • Monday, September 17, 2007 10:34 PMRandy DrisgillMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    In your SharePoint:AspMenu in the masterpage try adding ItemWrap="true". This should force long items to wrap and then you just have to adjust css to make it look nicer.

     

  • Monday, September 17, 2007 11:36 PMAlex Smith [MSFT] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I haven't encountered this, but I'm curious. What constitutes "long" items? Is there a certain value that can be set? Like 15 characters, or 50 pixels?

     

    For example, if I set the ItemWrap="true" and a CSS width of 50px, then does the item wrap after 50 pixels?

     

    Thanks for the clarification.

     

  • Tuesday, September 18, 2007 12:09 AMRandy DrisgillMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Yes, pretty much the ItemWrap allows the line to break where ever it normally would. Without this turned on, the line will never break even if you type the constitution in there Wink
  • Wednesday, September 19, 2007 2:32 PMBob Sieloff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Yikes!

     

    I got word wrap, but I had nav item seperator lines everywhere.  I tried increasing/decreasing my width attribute within the .css to make it seem right but nothing seemed to correct it.  Also, nav items that were smaller than the defined pixel size were increased to that size and then had a lot of "blue space" on the tab. 

     

    Perhaps I was working on the wrong class;  topnavitem

     

    any suggestions?

     

    Thanks again

     

  • Wednesday, September 19, 2007 10:30 PMRandy DrisgillMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    To be honest the navigation css is some of the more complex css you will encounter in MOSS. I often spend a lot of time in Firebug tweaking the css and watching the changes on the fly. That’s my best recommendation.