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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:25:13+00:00 2026-06-18T21:25:13+00:00

I’m look to do the following http://codepen.io/anon/pen/eIfdn for the Twitter bootstrap navbar. It simply

  • 0

I’m look to do the following
http://codepen.io/anon/pen/eIfdn
for the Twitter bootstrap navbar.
It simply adds a shadow to the navbar upon scrolling. Any advice would be helpful thank you.

.navbar {
*position: relative;
top: 0;
left: 0;
width: 100%;
height: 80px;
z-index: 999;
-webkit-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5);
box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5);
display: none;
*z-index: 2;
margin-bottom: 20px;
overflow: visible;
}

Thats the css I changed and I added in the js from above.

Here’s the JS I used

$(document).ready(function(){
 $(window).scroll(function(){
  var y = $(window).scrollTop();
  if( y > 0 ){
  $("#navbar").css({'display':'block', 'opacity':y/20});
  } else {
  $("#navbar").css({'display':'block', 'opacity':y/20});
  }
 });
})
  • 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-18T21:25:14+00:00Added an answer on June 18, 2026 at 9:25 pm

    Here is somenthing to get you started:
    http://jsfiddle.net/panchroma/pyYfG/

    HTML

    <div class="navbar" data-spy="affix">
    <div class="navbar-inner">
    .... standard navbar stuff ...
    </div>
    </div>
    <div id="top-shadow"></div>
    .... page content ...
    

    CSS

    #top-shadow {
    position: fixed;
    top: 0;
    left: 20px;
    width: 100%;
    height: 42px;
    z-index: 999;
    -webkit-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5);
    -moz-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5);
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5);
    display: none;
    }
    
    .navbar.affix{ /* position fixed navbar */
    top:0; 
    width:100%;
    }
    
    /* UPDATE BELOW */
    .navbar{    
    z-index:1000; /* lift .navbar above #top-shadow */
    }
    

    The important bits are that I’m using the affix behaviour to lock the navbar inplace, and I’m applying the shadow to a new div just below the navbar. I think this will be easier to manage that trying to add a shadow directly to the navbar itself.

    Good luck!

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

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.