Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add text shadow to Twitter Bootstrap navbar links?

So far I've tried:

.navbar-inner {
  text-shadow: black 0.1em 0.1em 0.2em;
}

And:

.nav > li > a {
  text-shadow: black 0.1em 0.1em 0.2em;
}

Neither works. What gives?

FYI my navbar html code is the same as the Twitter Bootstrap demo code:

<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
      <a class="brand" href="#">Test Inc.</a>
      <div class="nav-collapse">
        <ul class="nav">
          <li class="active"><a href="#">Home</a></li>
          <li><a href="#about">About</a></li>
          <li><a href="#contact">Contact</a></li>
        </ul>
      </div><!--/.nav-collapse -->
    </div>
  </div>
</div>
like image 626
XåpplI'-I0llwlg'I - Avatar asked Dec 04 '22 15:12

XåpplI'-I0llwlg'I -


1 Answers

Try:

.navbar .nav > li > a{
  text-shadow: black 0.1em 0.1em 0.2em;
}

Demo: here

one advice use px instead of em because bootstrap uses px

like image 171
HaNdTriX Avatar answered Jan 11 '23 01:01

HaNdTriX