Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8897261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:17:40+00:00 2026-06-15T00:17:40+00:00

I am building a navigation bar for my website . This navigation bar elements

  • 0

I am building a navigation bar for my website . This navigation bar elements are dynamic . To fit the elements automatically I have the below code

.mytaboptions {
    position: relative;
    margin: 0px 0 10px 0;
    font-weight: bold;
    font-family: arial;
    font-size: 11px;        
    background-color: #305081;    
}

.mytaboptions li {
    list-style-type: none;
    margin: 0;
    display: table-cell;
    width: 1%;
    background-color: #305081;
}

.mytaboptions li a {
    display: block;
    text-align: center;
    line-height: 15px;
    color: #AAAAAA;
    text-decoration: none;    
}

.mytaboptions li a:hover {
    color: #00788A;
    background: #c7c7c7;
}
.mytaboptions li.active a {
    border-bottom: 2px solid #DADADA;    
}
.mytaboptions li.selected {
    background: #fafbfd;
    border-bottom:none;    
}

.mytaboptions span{
    font-size: 10px;
    font-style:italic;
    color: #AAAAAA;
}

This works fine . But if I have space between words in a tab ( <li> tag ) it splits into two lines . If I add &nbsp; it works fine .

Please have a look at the below fiddle what I am talking

http://jsfiddle.net/MJEKa/

You can see I used &nbsp; in the first nav bar and it looks good . But the second one you see it splits . ( You can see some other option in the end )

I am wondering any solution without using &nbsp; ?

Thanks for your help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:17:41+00:00Added an answer on June 15, 2026 at 12:17 am

    Try to use white-space: nowrap; to stop wrapping of text.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a website, where elements of the navigation bar are animated using HTML5's
I'm building a website, and would like to make aa navigation bar with submenus.
I am using Bootstrap v2.0.2 . Below is the navigation bar I am building
Basically, I am building a horizontal navigation bar. I have following markup: <ui:style src=../common.css
i'm building my own navigation between views and i have the navi bar hidden
I'm building a single page website with the top bar navigation linking to different
I'm building a navigation system using jquery scrollto. I have my navigation menu in
I am building a navigation bar which will be located at the top of
I'm building a site with a simple navigation bar. I've written some CSS to
I'm building a SL4 app. I have two controls, a top search bar and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.