Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



Fixed Navigation Bar - CSS

Modified on Tue, May 21, 2013, 11:44 AM by Administrator Categorized as HTML and CSS
The following HTML/CSS demonstrates how to have a fixed area at the top of a web page.

<style type='text/css'>
    padding: 0 0 0 0;
    margin: 0 0 0 0;
    position: fixed;
    top: 0;
    background-color: silver;
    width: 100%;
    white-space: nowrap;
    margin-top: 30px;
<div class='fixedNavBar'>This is my navigation bar</div>

<div class='content'>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nulla nisi, porttitor at 
    auctor non, tincidunt vel magna. Pellentesque condimentum molestie nibh sit amet lacinia. Donec 
    nisl mi, dapibus lacinia scelerisque vitae, gravida a quam. Integer vel risus lorem. Vestibulum 
    ut ante elit. Maecenas rutrum mattis nisl nec fringilla. Ut molestie felis a turpis auctor sed 
    ultrices neque fringilla. </p>

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2023, Patrick Jasinski.