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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:38:44+00:00 2026-06-15T03:38:44+00:00

How to ovveride padding on a in navbar I got the following as css

  • 0

How to ovveride padding on a in navbar

I got the following as css rules for

.navbar .nav > li > a {
  float: none;
  padding: 10px 15px 10px;
  color: #555555;
  text-decoration: none;
  text-shadow: 0 1px 0 #ffffff;
}

and I would like to have padding: 5px, 5px, 5px

  • 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-15T03:38:46+00:00Added an answer on June 15, 2026 at 3:38 am

    And there is the problem with using bootstrap, its nice until you have to modify it.

    I found your particular rule by going into bootstrap.css and searching for “.navbar .nav” (I also use bootstrap in a ruby on rails project) it was around line 4380. (this is for the un-minified version)

    So you have several options:

    • You can find it and modify the rule there.

    • You can override it inline if you just need it on a few.

    • You can put it in a css file you know (I am assuming your using rails) rails will pre-compile it to be later then twitters rule (in css the last rule read is the one applied).

    • Or you could write your own rule and use !important at the end of the rule. That would look like this:

      .navbar .nav > li > a {
          padding: 5px 5px 5px !important;
      }
      

    Which is dangerous, (it can make it harder to maintain your css in the long run.) But still a valid option if all else fails.

    As a note: You should actually be using the un-minified version of bootstrap for development. When rails compiles your assets for deployment, it will minify it for you. Makes modifying 3rd party files 100x easier to work with.

    (This also assumes your not using a bootstrap gem to import your css, in which case see one of the options above)

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

Sidebar

Related Questions

Here is the css I am reading: .card { font-size: 72px; padding: 80px 40px;
I have a QGraphicsObject derived class that holds a QImage and ovveride paint(QPainter *painter,
Is it possible to keep the color on a link with a class while
I have some problem with my CSS Style. Currently, i have something like this:
I am using Twitter bootstrap and Rails and I can't seem to float a
In the past i would use the following simple data model to implement security
In the application delegate within my application I call the following method: - (void)customizeAppearance
I'm trying to alter the behaviour of autocomplete a little. I've got a mock
I've made own datagridview control which ovveride OnKeyDown event: public partial class PMGrid :
Basically why is the following invalid in C#? I can find plenty of good

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.