[SOLVED]veritcal navigation wont pop out

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
stuarty80
Forum Members
Forum Members
Posts: 19
Joined: Mon Feb 25, 2008 9:56 pm

[SOLVED]veritcal navigation wont pop out

Post by stuarty80 »

I am having a bit of trouble with my vertical navigation. Basically when i hover over the navigation the sub menu will not appear. It does appear though if i use the default leftside+1col menu.

To show what is happening here is a like to the site: http://www.stuartbogle.com/cmsmadesimple/index.php

My main template code is:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<head>
	<title>{sitename} - {title}</title>
                <__script__ type="text/javascript"></__script>
{stylesheet}
{metadata} 

</head>
</__body>
<div id="container">
	<div id="intro">
		<div id="pageHeader">
		</div>

		<div id="menuBack">
		     {menu template='cssmenu.tpl'}
                                     <p class="p2"><span></span></p>                        	
		</div>

		<div id="colorButtons">
			<p class="p1"><span></span></p>
			<p class="p2"><span></span></p>
			<p class="p3"><span></span></p>
		</div>
	</div>

	
	<div id="linkList">
		{cms_module module="news"}
	</div>

   	
	<div id="supportingText">
	{content}
	</div>

	<div id="footer">
                <a href="http://www.stuartbogle.com" title="stuartbogle.com">created by: stuartbogle.com</a>   </div>
                </div>

</div>
<__body>
</__html>

the code to style my layout is:

Code: Select all

/* CSS Document */
a:link {
	color:#8297A7;
	text-decoration:underline;
}

a:visited {
	color:#A082A7;
}

a:hover {
	text-decoration:none;
}

body {
	font:x-small/1.4 Tahoma, Verdana, Helvetica, Arial, sans-serif;
	background:#FFF url(images/bg.gif) repeat top left;
	color:#555040;
	margin:0;
	padding:0;
	text-align: center;
}

#container {
	margin: 0 auto;
	background:#FFF;
	width: 780px !important; 
	width /**/:790px; /* IE5/Win */
	padding:0 0px;
	position:relative;
	font-size:110%;
	text-align: left;
}

#pageHeader {
	width:780px;
	height:42px;
	background:#FFF url(images/header.gif) no-repeat top left;
}


div#main_pict {
   margin-left: 260px; /* this will give room for sidebar to be on the left side, make sure this space is bigger than sidebar width */
   margin-right: 2%; /* and some air on the right */
width:520px;
	height:300px;
	background:#FFF url(images/main_pict.jpg) no-repeat top left;
}

div#sidebar {
   float: left;        /* set sidebar on the left side. Change to right to float it right instead. */
   width: 26%;     /* sidebar width, if you change this please also change #main margins */
   display: inline;  /* FIX IE double margin bug */
   margin-left: 0;
}


#menuBack {
	height:300px;
	width:780px;
	background-color:#FFF;
	position:relative;
}

#menuBack p {
	margin:0;
	padding:0;
}

#menuBack .p {
	position:absolute;
	top:0;
	left:0;
	width:260px;
	height:300px;
	background:#FFF;
}

#menuBack .p1 span { display:none; }

#menuBack .p2 {
	position:absolute;
	top:0;
	left:260px;
	width:520px;
	height:300px;
	background:#FFF url(images/main_pict.jpg) no-repeat top left;
	overflow:hidden;
}

#menuBack .p2 span {
	visibility:hidden;
	white-space:nowrap;
}


#pageHeader h1, #pageHeader h2 {
	display:none;
}

#colorButtons {
	height:92px;
	width:780px;
	background-color:#FFF;
	position:relative;
}

#colorButtons p {
	margin:0;
	padding:0;
}

#colorButtons .p1 {
	position:absolute;
	top:0;
	left:0;
	width:260px;
	height:92px;
	background:#FFF url(images/button_orange.gif) no-repeat top left;
}

#colorButtons .p1 span { display:none; }

#colorButtons .p2 {
	position:absolute;
	top:0;
	left:260px;
	width:260px;
	height:92px;
	background:#FFF url(images/button_green.gif) no-repeat top left;
	overflow:hidden;
}

#colorButtons .p2 span {
	visibility:hidden;
	white-space:nowrap;
}

#colorButtons .p3 {
	position:absolute;
	top:0;
	left:520px;
	width:260px;
	height:92px;
	background:#FFF url(images/button_blue.gif) no-repeat top left;
	overflow:hidden;
}


#supportingText {
   width: 495px;
   padding:8px;
}

#linkList {
   float: right;
   clear: right; 
   padding:5px;
   width:250px;
}


#footer {
   margin: 0 auto;
   border-top:5px solid #FFF;
   background-color:#555040;
   padding:10px;
   text-transform:uppercase;   
   clear: both;
}


#footer a {
	color:#FFF;
	text-decoration:underline;
}

#footer a:hover {
	color:#D2DBE2;
	text-decoration:none;
}

#explanation h3, #participation h3, #benefits h3, #requirements h3 {
	margin:10px 0 5px;
	padding:0;
	width:238px;
	height:24px;
}

#explanation h3 { 		background:transparent url(images/title_so_what.gif) no-repeat top left; }
#participation h3 { 	background:transparent url(images/title_participation.gif) no-repeat top left; }
#benefits h3 { 			background:transparent url(images/title_benefits.gif) no-repeat top left; }
#requirements h3 { 		background:transparent url(images/title_requirements.gif) no-repeat top left; }

#preamble h3 span,
#explanation h3 span,
#participation h3 span,
#benefits h3 span,
#requirements h3 span {
	display:none;
}

#lselect li a, #lfavorites li a {display: block; margin-left:-10px; font-weight:bold;}
#linkList li a.c, #lfavorites li a.c {float:none; display:inline; margin-left:0; font-weight:normal; font-size:100%;}

#supportingText p {
	margin:0 10px 10px;
	padding:0;
}

#linkList ul {
	width:210px;
	margin:0 0 10px 15px;
	padding:0;
}

#linkList li {
	padding: 0 0 0 20px;
	margin:0 0 5px;
	list-style-type:none;
	white-space:nowrap;
	background: transparent url(images/bullet_normal.gif) no-repeat 0 1px;
}

#lselect ul, #lfavorites ul {
	width:210px;
	margin:0 0 10px 15px;
	padding:0;
}

#lselect li, #lfavorites li {
	padding: 0 0 0 25px;
	margin:0 0 5px;
	list-style-type:none;
	clear:left;
	white-space:nowrap;
	background: transparent url(images/bullet_styles.gif) no-repeat 0 3px;
}

#linkList h3 {
	margin:0 0 10px;
	background:#6E6855 url(images/link_list_h3.gif) repeat-y top left;
	padding:5px 5px 5px 15px;
	font-weight:bold;
	color:#E9E6D9;
	font-size:100%;
}

acronym {
	border-bottom:1px dotted #555040;
	cursor:help;
}

a acronym {
	border-bottom:1px dotted #8297A7;
}

#lfavorites, #larchives, #lresources {
	border-top:5px solid #FFF;
}

and finally the code for my menu is:

Code: Select all

/* Vertical menu for the CMS CSS Menu Module */
/* by Alexander Endresen */


/* The wrapper determines the width of the menu elements */
#menuwrapper { 
   width: 220px; 
}


/* Unless you know what you do, do not touch this */ 
#primary-nav, #primary-nav ul { 
   list-style: none; 
   margin: 0px; 
   padding: 0px; 
   width: 100%; 
   margin-left: -1px;
}
#primary-nav ul { 
   position: absolute; 
   top: 0; 
   left: 100%; 
   display: none; 
}
#primary-nav li { 
   margin-bottom: -1px; 
   position: relative; 
}


/* Styling the basic apperance of the menu elements */
#primary-nav a { 
   border: 1px solid #006699; 
   display: block; 
   margin: 0px; 
   padding: 5px 10px; 
   color: #006699;
   text-decoration: none; 
   background: transparent; 
   min-height:1em; /* Fixes IE7 whitespace bug*/ 
}
#primary-nav li, #primary-nav li.menuparent { 
   background-color: #ececec; 
   min-height:1em; /* Fixes IE7 bug*/
}


/* Styling the basic apperance of the active page elements (shows what page in the menu is being displayed) */
#primary-nav li.menuactive { 
   background-color: #C7C7C7; 
}

/* Styling the basic apperance of the menuparents - here styled the same on hover (fixes IE bug) */
#primary-nav li.menuparent, 
#primary-nav li.menuparent:hover, 
#primary-nav li.menuparenth { 
   background-image: url(images/cms/arrow.gif); 
   background-position: center right; 
   background-repeat: no-repeat; 
}


/* Styling the apperance of menu items on hover */
#primary-nav li:hover, 
#primary-nav li.menuh, 
#primary-nav li.menuparenth, 
#primary-nav li.menuactiveh { 
   background-color: #E7AB0B; 
}


/* The magic - set to work for up to a 3 level menu, but can be increased unlimited */
#primary-nav ul, 
#primary-nav li:hover ul, 
#primary-nav li:hover ul ul, 
#primary-nav li.menuparenth ul, 
#primary-nav li.menuparenth ul ul { 
   display: none; 
}
#primary-nav li:hover ul, 
#primary-nav ul li:hover ul, 
#primary-nav ul ul li:hover ul, 
#primary-nav li.menuparenth ul, 
#primary-nav ul li.menuparenth ul, 
#primary-nav ul ul li.menuparenth ul { 
   display: block; 
}


/* IE Hack, will cause the css to not validate */

#primary-nav li, #primary-nav li.menuparenth { _float: left; _height: 1%; }
#primary-nav li a { _height: 1%; }


/* section header */
#primary-nav li.sectionheader {
   border-left: 1px solid #006699; 
   border-top: 1px solid #006699; 
   font-size: 130%;
   font-weight: bold;
   padding: 1.5em 0 0.8em 0.5em;
   background-color: #fff;
   margin: 0;
   width: 100%;
}


/* separator */
#primary-nav li hr.separator {
   display:block;
   height: 0.5em;
   color: #abb0b6;
   background-color: #abb0b6;
   width: 100%;
   border:0;
   margin:0;
   padding:0;   
   border-top: 1px solid #006699;
   border-right: 1px solid #006699;
}

As i have said, it works on the default layout so i know it is picking up the menu correctly, but on my template it just will not display properly.

Please help

cheers

stu
Last edited by stuarty80 on Thu Mar 06, 2008 5:57 pm, edited 1 time in total.
stuarty80
Forum Members
Forum Members
Posts: 19
Joined: Mon Feb 25, 2008 9:56 pm

Re: veritcal navigation wont pop out

Post by stuarty80 »

I sorted the problem. I found a bit of code in one of the main templates. I simply added the following code just above the HEAD tag.

Code: Select all

<!--[if IE]>
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->
{* The above JavaScript is required for CSSMenu to work in IE *}
Now the menu works properly and picks up the sub nav.
Post Reply

Return to “Layout and Design (CSS & HTML)”