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

  • Home
  • SEARCH
  • 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 8870897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:50:59+00:00 2026-06-14T17:50:59+00:00

At the moment I am building my first responsive site with Twitter Bootstrap and

  • 0

At the moment I am building my first responsive site with Twitter Bootstrap and I am running into an issue I can’t solve by myself.

I am customizing the media queries, but when it comes to the links inside the navbar I am stuck.
I want .brand to be centered and the navigation links should be centered below – a new line for each link. I managed to center .brand using this CSS code in the appropriate media query:

.brand {
    display: block;
    width: 100%;
    text-align: center;
}

Now for the links. This is the code:

.navbar li a {
    display: block;
}

The selector seems right because when I assign a background color, it shows up. But using display: block; does not result in a new row for each link. Using width: 100%; also does not result in the desired form.

My guess is that it has something to do with the li each link is wrapped in.

<div class="navbar">
    <div class="navbar-inner">
        <a class="brand" href="#">Thomas Glaser</a>
            <ul class="nav">
                <li><a href="#">Arbeiten</a></li>
                <li><a href="#about">Thomas</a></li>
                <li><a href="#contact">Kontakt</a></li>
            </ul>
    </div><!-- /.navbar-inner -->
</div>

I tried to fiddle around with the CSS, but using a trial & error method in combination with such large CSS files is not really recommended I guess, that’s why I am asking you: What CSS code is needed, to display the links inside the navbar one below the other?

  • 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-14T17:51:00+00:00Added an answer on June 14, 2026 at 5:51 pm

    It’s actually pretty straightforward, all you need are the following css rules:

    .navbar .nav {
        width: 100%;
    }
    
    .navbar .nav > li {
        float: none;
        text-align: center;
    }
    

    So you were right, it’s the li that needs to be styled, not the anchor 🙂

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

Sidebar

Related Questions

I'm building a micro site at the moment and I have a problem. I
At the moment I have two classes, first one is called Building and second
At the moment I'm building a login Script on powershell basis. This login script
I'm building a single-page application. At the moment, I also have several independent pages
I'm building a web app that's going to support multiple languages. For the moment,
I am currently building my first Immediacy Plugin, and do not have access to
I must say I am quite new at WPF. I am building my first
At this moment we are building a new architecture that is based on the
I am currently building two windows services: The first takes messages from an internet
I am a java beginner and for my first project I started building a

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.