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 8848657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:28:23+00:00 2026-06-14T12:28:23+00:00

I am having some problems with the alignment of the links inside the navbar

  • 0

I am having some problems with the alignment of the links inside the navbar for the mobile version of my site. When looking at the desktop version, everything is ok. It looks like this:

enter image description here

Code:

.navbar {
    margin-top: 30px;
    min-height: 50px;
    padding: 0;
    background-color: red;
    background-image: none;
    filter: -;
    border: none;
    -webkit-border-radius: none;
    -moz-border-radius: none;
    border-radius: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    *zoom: 1;
}

.navbar-inner {
    background-color: fuchsia;
    background-image: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.navbar li a,
.navbar .nav > li > a:hover {
    margin-left: 20px;
    background-color: #5593f8;
    webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
}

Now for the mobile version. It looks like this at the moment:

enter image description here

Code:

@media (max-width: 767px) {
    body {
      padding-right: 0;
      padding-left: 0;
    }
    .navbar {
        margin-top: 0px;
    }
    .navbar .nav > li {
        float: none;
        text-align: center;
    }
    .navbar li a,
    .navbar .nav > li > a:hover {
        margin: 0;
    }    
    .navbar .nav {
        width: 100%;
        background: red;
    }
    .navbar-inner {
        padding: 0;
        margin: 0;
    }
}

Do you see that small gap on the left where the fuchsia can be seen? I don’t want that. I want the links to be width: 100%, but somehow that’s not possible. I spend nearly the whole day to figure out what the problem is, but I can’t wrap my head around it. Its not margin, its not padding, but what is it? Please help me.

  • 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-14T12:28:25+00:00Added an answer on June 14, 2026 at 12:28 pm

    Ok, I got it!

    After the media query posted above, I had this:

    @media (max-width: 979px) {
           .navbar {
               margin-top: 0px;
           }
           .navbar-inner {
               padding-left: 5px;
            }
       }
    

    The 5px declared in the last rule are gap you see in the post above. Moving the rule from this post above the rule from the first post did solve the problem.

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

Sidebar

Related Questions

Currently having some problems- now = datetime.datetime.now() month = now.strftime(%B) site = wikipedia.getSite('en', 'wikiquote')
Im having some problems getting the Sticky Footer to work on my site. If
I'm having some frustrating alignment issues. I had previously posted a question because everything
Im having some problems with a simple toggle in Safari. A really annoying flickering
I am having some problems with the PDF files that I make using the
I'm having some problems trying to figure out how to generate a Google Map
I'm having some problems while using PDO. It all seems correct but I am
I'm having some problems building an hierarchistic array structure - I have almost got
I am having some problems with finding out if the value is missing or
I'm having some problems with some commands in Java. I created a JAR that

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.