www.webdeveloper.com
Results 1 to 2 of 2

Thread: help positioning an object

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    21

    help positioning an object

    I want the navigation for my site to be fixed to the top of the page, but move horizontally with the content in the page (and not scroll). The content is centered. I've tried all the permutations I can think of. Any ideas?
    thanks

  2. #2
    Join Date
    Aug 2010
    Location
    San Diego
    Posts
    242
    Not exactly sure what you want, but maybe
    Code:
    .head-wrapper { 
      position:fixed; 
      top:0;  
      width:100%;
    }
    
    header { 
      width:50%; 
      margin:0 auto; 
      background-color:#ccc;
    }
    HTML Code:
      <div class="head-wrapper">
         <header>
           this is the header
        </header>
      </div>
    see example here: http://codepen.io/anon/pen/dhpoj

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles