CSS 'fixed' position question


i'm using css position:fixed; styling nav bar , i'm having issues it.  fixed relative browser size, problem, need fixed stays in position when page scrolls.  wanted nav bar in center of screen, put in left:50%.  have found starts nav div @ 50% , if nav div 500px wide , laptop 960px nav bar no near center.  tried left:50%-250px; puked.  there way combine absolute , fixed values, can place nav bar want , still keep in place page scrolls?

 

http://gtworkspace.com/septembermisc/

fixed relative browser size

 

no, it's not.  it's relative location of nearest positioned ancestor.  in absence of such ancestor (a container), defaults upper, left-hand corner of browser viewport.  thus, can change reference point wrapping entire page in relatively positioned, centering, fixed-width container, e.g.,

 

<body>

<div style=width:960px; margin:0 auto; position:relative;">

...

</div>

</body>



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい