Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2010, 01:52 PM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Unhappy Chapter 7: DynamicHoverStyle

Hi Imar,

I have a little problem . Just when I thought I was getting the hang of setting up menus, I ran into a snag!

I have two websites I am working on. One called ascusct.com and the other called home-remake.com. In the Ascus website, which I did first, I was able to get the menus to look exactly the way I want them to look. In the Home-Remake website all the menu components are working except for the changing of the text color when you hover over the static menu items or the selected items. I printed out the css file for Ascus and compared it to the Home-Remake css file. They look similar with the exception of the colors used.

Attached is the code in the css file for the menus. Also, I have not set the backcolor or forecolor in any of the VWD properties

Code:
#MenuWrapper
{
	/*
		The menu spans the page width, right below the header.
		At the top and left a few pixels padding is applied to create some room.
	*/
	background-color: #8c6e23;
	background-image: url('Images/MenuBackground.jpg');
	width: 827px;
	height: 27px;
	padding-top: 7px;
	padding-left: 17px;
}

#MenuWrapper a
{
	/*
		Links in the Menu are white. This gets overriden by styles in chapter 7.
	color: #fff;
	*/
  
}

.MainMenu
{
	/*
	color: #EFE1BF;
	*/
	background-color : #8C6E23;
	width: 414px;
	height: 19px;
  font-size:  12px;
}

.StaticMenuItemStyle, .StaticMenuItemStyle a
{
	/*
	  Static mouse Main menu definitions
  font-size:  12px;
	*/
  color: #efe1bf;
  font-weight: bold;
  text-decoration: none;
  padding-left: 5px;
  padding-right: 5px;
}

.StaticHoverStyle, .StaticSelectedStyle
{
	/* 
  background-color: #645019;
	*/
  color: #C8AD75;
}

.DynamicMenuItemStyle
{
	/* 	*/
  font-size: small;
  color: #645019;
  background-color: #E4cB8F;
  padding: 4px 2px 4px 3px;
}

.DynamicHoverStyle
{
	/* 	*/
  background-color: #EFE1BF;
  color: #000000;
}

.DynamicHoverStyle a
{
	/* 	*/
  background-color: #EFE1BF;
  color: #8C6E23;
  text-decoration: none;
}
I've tried several combinations of things except the correct one to get it to work. Unfortunately for me, I do not know the correct one. If you have the time you can go to either of the website I mention above to see what I am talking about.

Any ideas.
Fred Rosado
 
Old June 15th, 2010, 03:08 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can try addressing the link in the menu item:

.StaticHoverStyle a
{
// whatever you need here
}

If that doesn't help, see if you can use the Internet Explorer Developer Toolbar (press F11 in IE 8) or Firebug (plugin for Firefox) to see what's going on.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 22nd, 2010, 03:39 AM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Default

Thanks Imar,

I tried that but it didn't give me the effect I needed. What I did was I commented all the static and dynamic menu classes in the Style.css file and worked with one class at a time and I was able to figure which should be what. Anyway it works the way I want it to work now.

I do have a very silly question. I got it to work the first time I read your book and performed a SiteMapPath control, but I can not completely duplicate my effort. Apparently the root node shows twice (eg: Home > Home). I remember doing something to not show two, but I can't remeber what. Got any ideas?

Fred
 
Old June 22nd, 2010, 03:42 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Fred,

Take a look at page 247, step 8: you need to set ShowStartingNode on the SiteMapDataSource to False.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 22nd, 2010, 03:56 AM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Default

WOW...that was fast!

I checked that value and I had already set it to False. That setting worked OK for the static main menu. However, my breadcrumb list still shows the root node and that is what I need to not show. I know it can be done cause I did it the first time around, but I made a check of the obvious setting pertaining to this feature and I cannot find a difference.

Maybe because it's 3:52AM here and I can no longer think anymore. I should probably go to sleep and try tomorrow. In the meantime if you remember anything please let me know.

Thanks,
Fred
 
Old June 22nd, 2010, 04:53 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can do it programmatically, as explained here:

http://www.wintellect.com/cs/blogs/j...temappath.aspx

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.