Results 1 to 3 of 3

Thread: BLM Menu: Styling items without links

  1. #1
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Unhappy BLM Menu: Styling items without links

    1) Script Title: BLM Multi-level Effects Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem: Cannot figure out how to style menu items without hyperlinks to match rest of menu

    Here is the page: http://www.flimpact.org/testmenu2.html

    Here is my menu code:
    Code:
    <div class="mlmenu vertical delay menuback accessible">	
    	<ul>
    		<li><font class="space">&nbsp;</font><br />About Us
    			<ul>
    				<li><a class="menu" href="/aboutus/general.html"><font class="space">&nbsp;</font><br />About Florida Impact</a></li>
    				<li><a class="menu" href="/aboutus/board.html"><font class="space">&nbsp;</font><br />Board of Directors</a></li>
    				<li><a class="menu" href="/aboutus/staff.html"><font class="space">&nbsp;</font><br />Our Staff</a></li>
    			</ul>
    		</li>
    		<li><a class="menu" href="/ptech.html"><font class="space2">&nbsp;</font><br />Partnership To End<br />Childhood Hunger</a></li>
    		<li><font class="space">&nbsp;</font><br />Resources For Families
    			<ul>
    				<li><a class="menu" href="/resources/healthcare.html"><font class="space">&nbsp;</font><br />Healthcare</a></li>
    				<li><a class="menu" href="/resources/nutrition.html"><font class="space">&nbsp;</font><br />Nutrition</a></li>
    				<li><a class="menu" href="/resources/housing.html"><font class="space">&nbsp;</font><br />Housing &amp; Utilities</a></li>
    				<li><a class="menu" href="/resources/income.html"><font class="space">&nbsp;</font><br />Income Assistance</a></li>
    			</ul>
    		</li>
    		<li><a class="menu" href="/yourvoice.html"><font class="space">&nbsp;</font><br />Let Your Voice Be Heard</a></li>
    		<li class="nav"><font class="space">&nbsp;</font><br />Publications
    			<ul>
    				<li><a class="menu" href="/current.html"><font class="space">&nbsp;</font><br />Current Publications</a></li>
    				<li><a class="menu" href="/archives.html"><font class="space">&nbsp;</font><br />Archived Publications</a></li>
    			</ul>
    		</li>
    		<li><a class="menu" href="/gallery.html"><font class="space">&nbsp;</font><br />Photo Gallery</a></li>
    		<li><a class="menu" href="/contact.html"><font class="space">&nbsp;</font><br />Contact Us</a></li>
    	</ul>
    </div>
    and here is my CSS:
    Code:
    	/*this is the css for the vertical version*/
    	.vertical ul{
    		list-style-type: none;
    		padding: 0px;
    		border-top: 0px;
    		width:170px;
    		margin-left:0px;
    		margin-top:0px;
    	}
    	.vertical li a{
    		display: block;
    		width:170px;
    		text-decoration: none;
    		height: 1em;
    		padding: .0em 0px;
    		border: 0px;
    		border-top: 0px;
    		margin-left:0px;
    	}
    	.vertical li{
    		/*Needed for IE. Don't ask me why, It was a lucky guess.*/
    		display: inline;
    		margin-left:0px;
    	}
    	.vertical li ul{
    		position: absolute;
    		margin-top: -3.8em;
    		margin-left: 170px;
    		border: 1px solid #747e30;
    	}
    
    
    	/*colors for menu*/
    	.menuback li a{
    		background-image:url(/graphicsnew/menufade.png);
    		background-repeat: repeat-x;
    		border-bottom:5px solid #e1e1b2;
    		height:35px; 
    		text-align:center;
    	}
    	.menuback li a:hover{
    		background-image:url(/graphicsnew/menufade.png);
    		background-repeat: repeat-x;
    		border-bottom:5px solid #e1e1b2;
    		height:35px; 
    		text-align:center;
    	}
    	.menuback ul{
    		border: 0px;
    	}
    
    
    	/*custom css*/
    
    	a.menu { 
    		font-family:verdana,arial,sans-serif;
    		color:#5c4e1a;
    		font-size:12p;
    		font-weight:normal;
    		text-decoration:none;
    	}
    	a.menu:visited {
    		color: #5c4e1a; text-decoration:none;
    	}
    	a.menu:active {
    		color: #f0efd4;
    		text-decoration:none;
    	}
    	a.menu:hover {
    		color: #f0efd4;
    		text-decoration:none;
    	}
    
    	.space {
    		font-family:verdana,arial,sans-serif;
    		color:#452e22;
    		font-size:8px;
    		font-weight:normal;
    		margin-top:0px;
    		margin-bottom:0px;
    	}
    	.space2 {
    		font-family:verdana,arial,sans-serif;
    		color:#452e22;
    		font-size:2px;
    		font-weight:normal;
    		margin-top:0px;
    		margin-bottom:0px;
    	}
    I've been playing with the CSS for over an hour, but cannot figure out how to style the three menu items (About Us, Resources for Families, and Publications) so they will match the other menu items with the background, centered text and height.

    Help!

    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You could make them anchor (a) tags without href attributes. They would be styled as the ones with href attributes but would lack :hover in IE 6 and less. Actually, you probably would prefer that situation in all browsers, so you could give them a class and set their :hover identical to their non-hovered rules.

    No browser will give them :visited or :active styles, as these will not apply.

    Alternatively, you could use a classed span to style them like their linked counterparts. This could be done without :hover, making it a little easier, ex:

    Code:
    	.vertical li a, .vertical li span.linklike {
    		display: block;
    		width:170px;
    		text-decoration: none;
    		height: 1em;
    		padding: .0em 0px;
    		border: 0px;
    		border-top: 0px;
    		margin-left:0px;
    	}
    HTML Code:
    <li class="nav"><span class="linklike"><font class="space">&nbsp;</font><br />Publications</span>
    Last edited by jscheuer1; 02-15-2009 at 05:03 PM. Reason: add alternative
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    dmwhipp (02-15-2009)

  4. #3
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    So obvious and I missed it completely. I just implemented it and it works perfectly. Thank you again for your help John.
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •