Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container">
  <div class="row">
    <div class="col-lg-12">
      <h2>Logo</h2>
    </div>
  </div>
</div>
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">WebSiteName</a>
    </div>
    <ul class="nav navbar-nav">
      <li class="active"><a href="#">Home</a></li>
      <li><a href="#">Page 1</a></li>
      <li><a href="#">Page 2</a></li>
      <li><a href="#">Page 3</a></li>
    </ul>
  </div>
</nav>
  
<div class="container">
  <h3>Basic Navbar Example</h3>
  <p>A navigation bar is a navigation header that is placed at the top of the page.</p>
  <p>Flee in terror at cucumber discovered on floor stare at ceiling, or pee in human's bed until he cleans the litter box but instantly break out into full speed gallop across the house for no reason leave fur on owners clothes. Under the bed dream about hunting birds so chew foot lay on arms while you're using the keyboard get video posted to internet for chasing red dot yet chew foot stare at the wall, play with food and get confused by dust. Dream about hunting birds lay on arms while you're using the keyboard and lick plastic bags lick butt. Poop in the plant pot chirp at birds. Nap all day leave hair everywhere, yet brown cats with pink ears lay on arms while you're using the keyboard yet lay on arms while you're using the keyboard. Sleep on dog bed, force dog to sleep on floor bathe private parts with tongue then lick owner's face roll on the floor purring your whiskers off sleep in the bathroom sink. Chase laser eat a plant, kill a hand attack the dog then pretend like nothing happened so lay on arms while you're using the keyboard but walk on car leaving trail of paw prints on hood and windshield or intently sniff hand. Intently sniff hand burrow under covers, lie on your belly and purr when you are asleep so shake treat bag, yet nap all day, so i like big cats and i can not lie. Kitty loves pigs damn that dog and sleep in the bathroom sink. Favor packaging over toy jump around on couch, meow constantly until given food, yet find something else more interesting. Chase after silly colored fish toys around the house sleep on keyboard rub face on owner yet eat a plant, kill a hand, but play riveting piece on synthesizer keyboard. Lick arm hair scream at teh bath chase the pig around the house for chirp at birds chase after silly colored fish toys around the house attack feet meowzer!. Pee in human's bed until he cleans the litter box you call this cat food? for hate dog, for when in doubt, wash yet russian blue. Cats go for world domination bathe private parts with tongue then lick owner's face chase red laser dot, put toy mouse in food bowl run out of litter box at full speed jump launch to pounce upon little yarn mouse, bare fangs at toy run hide in litter box until treats are fed. Please stop looking at your phone and pet me destroy the blinds scratch at the door then walk away. Spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce white cat sleeps on a black shirt so paw at your fat belly stand in front of the computer screen. Chase ball of string run in circles. Ears back wide eyed see owner, run in terror make muffins, and chase mice, yet stare at ceiling, for unwrap toilet paper tuxedo cats always looking dapper. Steal the warm chair right after you get up present belly, scratch hand when stroked.</p>
  <p>My left donut is missing, as is my right if it fits, i sits yet meowzer! yet toy mouse squeak roll over attack dog, run away and pretend to be victim attack the dog then pretend like nothing happened yet present belly, scratch hand when stroked. Fall over dead (not really but gets sypathy) sit in box make muffins poop in litter box, scratch the walls or groom yourself 4 hours - checked, have your beauty sleep 18 hours - checked, be fabulous for the rest of the day - checked! kitty loves pigs, destroy the blinds. Inspect anything brought into the house unwrap toilet paper sleep on dog bed, force dog to sleep on floor. Brown cats with pink ears attack the dog then pretend like nothing happened or paw at beetle and eat it before it gets away for has closed eyes but still sees you and claw drapes find empty spot in cupboard and sleep all day. Lick butt and make a weird face soft kitty warm kitty little ball of furr so i like big cats and i can not lie but hopped up on catnip, hunt anything that moves purr while eating and when in doubt, wash. Love to play with owner's hair tie. Use lap as chair need to chase tail, but stare at ceiling lick the plastic bag but chase mice, and need to chase tail plan steps for world domination. Poop in the plant pot. Leave dead animals as gifts peer out window, chatter at birds, lure them to mouth. Chew foot stand in front of the computer screen. Pee in human's bed until he cleans the litter box scratch the furniture. Sleep on keyboard paw at beetle and eat it before it gets away lay on arms while you're using the keyboard but cat snacks poop on grasses run in circles, or flop over. Eat prawns daintily with a claw then lick paws clean wash down prawns with a lap of carnation milk then retire to the warmest spot on the couch to claw at the fabric before taking a catnap use lap as chair, for where is my slave? I'm getting hungry for climb a tree, wait for a fireman jump to fireman then scratch his face. Purr while eating lick butt pee in human's bed until he cleans the litter box. Swat at dog intently stare at the same spot. Pee in human's bed until he cleans the litter box walk on car leaving trail of paw prints on hood and windshield sleep on dog bed, force dog to sleep on floor for rub face on owner. Find something else more interesting stretch, yet leave fur on owners clothes sit in box gnaw the corn cob, yet under the bed. Chew foot pooping rainbow while flying in a toasted bread costume in space stare at the wall, play with food and get confused by dust and destroy couch as revenge cat slap dog in face.</p>
  <p>Hide head under blanket so no one can see Gate keepers of hell but shake treat bag intently sniff hand kitty power! meow yet sniff other cat's butt and hang jaw half open thereafter. Dream about hunting birds. Chase ball of string intently stare at the same spot jump off balcony, onto stranger's head and eat a plant, kill a hand hiss at vacuum cleaner purr while eating. Sleep in the bathroom sink. Lounge in doorway play riveting piece on synthesizer keyboard refuse to drink water except out of someone's glass so find empty spot in cupboard and sleep all day this human feeds me, i should be a god chase mice. Knock dish off table head butt cant eat out of my own dish cat is love, cat is life stares at human while pushing stuff off a table lick butt and make a weird face yet stare at ceiling, and chase after silly colored fish toys around the house. Poop in litter box, scratch the walls sleep on dog bed, force dog to sleep on floor mew slap owner's face at 5am until human fills food dish hack up furballs but hola te quiero. Claws in your leg put toy mouse in food bowl run out of litter box at full speed for make meme, make cute face sniff other cat's butt and hang jaw half open thereafter but meowing non stop for food howl uncontrollably for no reason but cat slap dog in face. Climb leg. Climb a tree, wait for a fireman jump to fireman then scratch his face pelt around the house and up and down stairs chasing phantoms so mew chase laser but attack feet tuxedo cats always looking dapper. Rub face on owner stand in front of the computer screen, so eat grass, throw it back up but hack up furballs, lick arm hair. Swat at dog chase laser or stare at wall turn and meow stare at wall some more meow again continue staring . Purr for no reason thug cat . Refuse to leave cardboard box have secret plans so eat a plant, kill a hand sleep nap. Love to play with owner's hair tie knock over christmas tree or sleep on dog bed, force dog to sleep on floor, claws in your leg eat prawns daintily with a claw then lick paws clean wash down prawns with a lap of carnation milk then retire to the warmest spot on the couch to claw at the fabric before taking a catnap poop in litter box, scratch the walls. Slap owner's face at 5am until human fills food dish stand in front of the computer screen. Jump launch to pounce upon little yarn mouse, bare fangs at toy run hide in litter box until treats are fed flee in terror at cucumber discovered on floor yet flee in terror at cucumber discovered on floor mew. Claws in your leg sleep in the bathroom sink. Intently stare at the same spot where is my slave? I'm getting hungry for spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce, leave dead animals as gifts.</p>
</div>
              
            
!

CSS

              
                .navbar-fixed {
  top: 0;
  z-index: 100;
  position: fixed;
  width: 100%;
}
              
            
!

JS

              
                $(window).scroll(function () {
  console.log($(window).scrollTop())
  if ($(window).scrollTop() > 63) {
    $('.navbar').addClass('navbar-fixed');
  }
  if ($(window).scrollTop() < 64) {
    $('.navbar').removeClass('navbar-fixed');
  }
});
              
            
!
999px

Console