We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4429
    • 429 Posts
    Quote from: markhurd at Mar 26, 2009, 09:48 AM

    @c-m

    Your CSS is targeting an ID of "nav-1" but your source code is showing "navigation1". I made a quick change in Firebug and got your background image to show. Just make sure your image is positioned correctly (it appears to be a set of sprites).

    You’ll also want to put a negative text-indent on either the a or li element to hide the text.



    I don’t know where that "navigation" as oppose to "nav" is coming from.

    in my chunk as posted a few messages ago it is "nav" it is also "nav" in my CSS.

      • 18374
      • 69 Posts
      In your previous post you included:

      [!Wayfinder?startId=`0`&rowIdPrefix=`navigation`!]  


      That rowIdPrefix is causing the problem. Change it to "nav-", or change your CSS to "navigation". Either one, as long as they end up matching.
        • 4429
        • 429 Posts
        It works, but there are a couple of issues still:

        firstly my whole navigation column background is 620px long, but the only part that is shown is the part with the actual links.

        Secondly - I cannot position the text links, using padding ends up increasing the size the navigation background

        Thridly - without setting the margin to -40px the background does not appear as far left as possible.

        The site is http://www.presspointproofing.co.uk/easton/

        The wayfinder call is;
         [!Wayfinder?startId=`0`&rowIdPrefix=`nav-`!]  


        I have a chunk caleld navigation that contains the follow: (is ths needed?)
        <li id="nav-1"><a href="#" title="HOME"></a></li>
        		<li id="nav-2"><a href="#" title="ABOUT US"></a></li>
        		<li id="nav-3"><a href="#" title="SERVICES"></a></li>
        		<li id="nav-4"><a href="#" title="RECRUITMENT"></a></li>
        		<li id="nav-5"><a href="#" title="CONTACT US"></a></li>


        and the css is:

        html, body {
        	margin: 0;
        	padding: 0;
        }
        
        body {
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	font-size: 10px;
        	color: #000000;
        	background: #d5d5d5;
        }
        
        
        #page-container {
        	width: 960px;
        	margin: 0px auto;
        	background-color:#ffffff;
        }
        
        
        
        /****** layout columns ******/
        
        #header {
        	height: 200px;
        	width: 960px;
        	background: #ffffff	url(../images/header.jpg) no-repeat;
        		}
        	
        	
        
        
        
        
        
        /* VERTICAL NAVIGATION BAR
        	/////////////////////////////////////*/
        
        
        	ul#nav {	
        		width:225px;
        		list-style:none;
        		height:620px;
        		float: left;
        		margin-left: 0px;
        		margin-top: 0px;
        		padding: 0px;
        					}
        
        	ul#nav li {
        		display:block;
        		text-decoration:none;
        		height: 50px;
        		margin-left: -40px;
        	}
        	
        	
        
        	ul#nav li a  {
        width : 225px;
        display : block;
        font-size: 12px;
        color: #ffffff;
        text-decoration : none;
        } 
        
        
        
        	ul#navigation  li a span {
        	float:left;
        	display:block;
        	padding: 15px 0px 0px 10px;
        }
        
        	
        	ul#nav li#nav-1 a {
        		height:50px;
        		background:url(../images/nav1.jpg) no-repeat 0 0px
        	}
        
        	ul#nav li#nav-1 a:active,
        	ul#nav li#nav-1 a:hover {
        		background-position: -225px 0px
        	}
        
        	ul#nav li#nav-2 a {
        		height:50px;
        		background:url(../images/nav1.jpg) no-repeat 0 -50px
        	}
        
        	ul#nav li#nav-2 a:active,
        	ul#nav li#nav-2 a:hover {
        		background-position: -225px -50px
        	}
        
        	ul#nav li#nav-3 a {
        		height:50px;
        		background:url(../images/nav1.jpg) no-repeat 0 -100px
        	}
        
        	ul#nav li#nav-3 a:active,
        	ul#nav li#nav-3 a:hover {
        		background-position: -225px -100px
        	}
        
        	ul#nav li#nav-4 a {
        		height:50px;
        		background:url(../images/nav1.jpg) no-repeat 0 -150px
        	}
        
        	ul#nav li#nav-4 a:active,
        	ul#nav li#nav-4 a:hover {
        		background-position: -225px -150px
        	}
        
        	ul#nav li#nav-5 a {
        		height:50px;
        		background:url(../images/nav1.jpg) no-repeat 0 -200px
        	}
        
        	ul#nav li#nav-5 a:active,
        	ul#nav li#nav-5 a:hover {
        		background-position: -225px -200px
        	}
        
        /******************* end nav **************************/
        
        #sidebar {
        	height: 470px;
        	width: 230px;
        	float: right;
        	margin: 50px 50px 50px 25px;
        }
        
        
        #content {
        	height: 570px;
        	width: 400px;
        	line-height: 18px;
        	margin-left: 225px;
        	margin-right: 230px;
        	background: #ffffff;
        }
        
        	
        #footer {
        		margin-left: 225px;
        		height: 50px;
        		
        }
        
        
        
        /******* content styles *******/
        
        #content h1 {
        	margin: 0;
        	padding: 0;
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	padding-bottom: 15px;
        	font-weight: 400;
        	font-size: 22px;
        	color: #981c1e;
        }
        
        #content h2 {
        	margin: 0;
        	padding: 0;
        	padding-bottom: 15px;
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	font-weight: 300;
        	font-size: 18px;
        	color: #981c1e;
        }
        
        #content p {
        	margin: 0;
        	padding: 0;
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	font-size: 10px;
        	color: #000000;
        }
        
        #content a {
        	margin: 0;
        	padding: 0;
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        	font-size: 12px;
        	color: #981c1e;
        	text-decoration: none;
        }
        
        .padding {
        	padding: 50px 25px 10px 25px;
        }
        
        .footerpadding {
        	padding: 5px 50px 10px 25px;
        }


        Thanks for the help so far. Fortunately next week we have a propper web guy in the office, for now i have to do it.
          • 4429
          • 429 Posts
          Can anyone tell me what this code is for:

          <div id="nav">
               <ul id="navigation">
                  <ul>
                      <li id="navitem2" class="active"><a href="/index.php?id=2" title="Belts" >Belts</a></li>
                      <li id="navitem3"><a href="/index.php?id=3" title="Jewelry" >Jewelry</a></li>
                      <li id="navitem4"><a href="/index.php?id=4" title="Contact" >Contact</a></li>
                      <li id="navitem5"><a href="/index.php?id=5" title="About" >About</a></li>
                      <li id="navitem6"><a href="/index.php?id=6" title="Retailers" >Retailers</a></li>
                      <li id="navitem7" class="last"><a href="/index.php?id=7" title="Wholesale" >Wholesale</a></li>
                 </ul>     
          </ul>
          </div>


          Surely the whole point of using wayfinder is that you do not have hardcoded navigation?
            • 18374
            • 69 Posts
            I believe that is generated from the Wayfinder snippet call.

            You’re right - Wayfinder does away with hardcoding the navigation. If my assumption is correct in that the above code being generated, seems like it’s doing it’s job to me.
              • 4429
              • 429 Posts
              Hmm - I’m not sure I see the point of this at all. As correct me if i’m wrong, but everytime you added a menu item, you would:

              a) have to edit your sprite image
              b) edit your css and name the new menu item in the css the same as its page id e.g navitem109 etc.. as wayfinder appends the document number to the prefix.