CSS Nav Bar/Positioning Q's
ok, i'm trying learn how basic vertical navigational menu out of css. excuse me being css stupid...
i found online how basic nav menu using html lists. can't figure out how things stay positioned how want them or anything. main goal have nav menu on left side staying in same position towards center of page without moving around when resize windows. @ moment positioning top left corner of browser window if browser resizes follows.
is making menu out of html/lists easiest way? there no way 100% css on seperate page if ever want update menu don't have change html on every page? change in css...
here simple fake example of code got going:
html:
<body class="body"> <div id="container1"> <ul id="navbar"> <li><a href="#">home</a></li> <li><a href="#">about us</a></li> <li><a href="#">services</a></li> <li><a href="#">products</a></li> <li><a href="#">contact</a></li> </ul> </body> </html>
css:
body { position: relative; margin: 0; padding: 0; text-align: center; color: #000000; background-color: #ffffff; } #container1 { width: 600px; height: 400px; background: #666666; margin: 0 auto; border: 1px solid #000000; text-align: left; } ul#navbar { position: absolute; padding: 15px 10px 15px 20px; list-style:none; left: 200px; top: 50px; }
you shouldn't need use relative postioning because it's implied in default css. have @ basic css page layout. view page source see code used create it.
http://alt-web.com/templates/2-column-fixed-width-template.shtml
to populate site pages common menu, search server-side includes (ssi) or dreamweaver templates. personal choice common headers, menus , footers use server-side includes.
nancy o.
alt-web design & publishing
web | graphics | print | media specialists
www.alt-web.com/
www.twitter.com/altweb
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment