Rino
Rino

Reputation: 1

joomla 3.0 twitter bootstrap nav-collapse text decoration

I'm using CMS Joomla 3.0 with bootstrap integrated. I like to use the nav-collapse and modify the style like change text color, background color and shape (rounded border) these works fine. Only there is a shadow (I think), which I can’t get away or remove it. I tried ‘text-decoration: none;' in my css but it doesn't work.

So I want single Text in white, no extra decoration.

My html:

<div class="row-fluid">
  <nav class="navbar topnav"> 
    <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </a>
    <div class="nav-collapse collapse topbtn">
      <ul class="nav menu">
        <li class="item-435"><a href="/" >Home</a></li>
        <li class="item-468"><a href="/contact" >Contact</a></li>
      </ul>
    </div>
 </nav>
</div>

My CSS:

.navbar {
  background-color: #FFF; /* background color will be black for all browsers */
  background-image: none;
  background-repeat: no-repeat;
  filter: none;
}

.nav-collapse li{
    text-decoration: none;
    color:#FFF; 
    min-width: 150px;
    margin: 2px 4px 4px 0px;
    text-align: center;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none;
}

.navbar .topbtn a{
    text-decoration: none;  
    border-radius: 0px 10px 10px 0px / 0px 20px 20px 0px;
    -moz-border-radius: 0px 10px 10px 0px;  /* Old Firefox */
    background-color: #006FB7;
    padding: 2px 2px 8px 15px;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none;
}

.navbar .topbtn .active > a, .navbar .topbtn .active > a:hover{
  text-decoration: none;
  color:#FFF;   
  font-weight:bold;
  background-color: #8EBD43;
  box-shadow: none;
  -webkit-box-shadow: none;;
  -moz-box-shadow: none;
}

In IE8 the test looks ok (rounded corners not supported), in firefox & safari the text is not as i would like

Upvotes: 0

Views: 1143

Answers (1)

Bakual
Bakual

Reputation: 2731

Bootstrap by default indeed applies some text-shadow and font-weight to the (collapsible) navbar. You can try this at the end of your CSS file to override it:

.navbar .nav > li > a {
    text-shadow: none;
}
.nav-collapse .nav > li > a,
.nav-collapse .dropdown-menu a {
    font-weight: normal;
}

The navbar formatting comes from /media/jui/less/navbar.less and /media/jui/less/responsive-navbar.less if you want to have a closer look at the source.

Upvotes: 0

Related Questions