PDA

View Full Version : Horizontal Nav Bar with Horizontal Centered Sub-menus?


joesp
07-23-2009, 05:00 AM
I am working on my website and trying to create a dwt for all pages. I have come to the footer, where I want to place the navigation. I would like the Navigation to work like this seen in my concept sketch (attached), but am unsure how to pull it off. I'm not completely new to DW, but don't use it enough to be proficient. The template code follows:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
margin: 0;
text-align: left; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #363636;
height: 388px;
padding-top: 5px;
padding-right: 0;
padding-bottom: 5;
padding-left: 0;
}
.oneColFixCtrHdr #container {
width: 720px;
margin: 0 auto;
text-align: left; /* this overrides the text-align: center on the body element. */
background-color: #363636;
}
.oneColFixCtrHdr #header {
background: #DDDDDD; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.oneColFixCtrHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}
.oneColFixCtrHdr #mainContent {
background-color: #363636;
font-family: Verdana;
background-image: url(../Images/Rolling_Meadow.jpg);
background-position: center center;
background-repeat: no-repeat;
height: 388px;
margin-top: 8px;
margin-bottom: 8px;
}
.oneColFixCtrHdr #footer {
padding: 0 10px;
border-top-color: #725D4C;
border-top-width: 5px;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
.oneColFixCtrHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
body,td,th {
font-family: Verdana;
}
-->
</style>
</head>
<body class="oneColFixCtrHdr">
<div id="container">
<div id="header">
<!-- end #header -->
<img src="../Images/Seed_Header.jpg" width="720" height="125" alt="Seed Architecture Joe Seipel-Parks Architect Elkin, NC North Carolina" /></div>
<div id="mainContent">
<h1> Main Content </h1>
<p>Lorem ip</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam </p>
<!-- end #mainContent --></div>
<div id="footer">
<p>&nbsp;</p>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>


Thank you for any assistance.

edbr
07-23-2009, 06:37 AM
.oneColFixCtrHdr #footer {
padding: 0 10px;
border-top-color: #725D4C;
border-top-width: 5px;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none
text-align:center; //add this line
}
you could also add it to the p tag if you prefer, and add the links within the tag

joesp
07-23-2009, 03:05 PM
Thank you for the centering alignment. I understand I cannot make these active links until I have the other pages created from this template, but I'm trying to plan ahead with my styles, etc. Is there anyway to align the second row of text (pull down nav menu) with the the word they reference above? For example, I would like to center or left justify the three words under ABOUT with respect to ABOUT.

What's the best way to set up the nav menu with respect to pop down of second line sub-items on hover of main topic above? Here is the footer code:

<div id="footer">
<p align="center" class="style3">ABOUT&nbsp;&nbsp;&nbsp;PORTFOLIO&nbsp;&nbsp;&nbsp;RESOURCES&nbsp;&nbsp;&nbsp;CONTACT<br />
<span class="style4">PHILOSOPHY&nbsp;&nbsp;EXPERIENCE&nbsp;&nbsp;SUSTAINABILITY</span></p>
<!-- end #footer --></div>

The link is: http://www.seedarchitecture.com//Seed-Template-06.htm