Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old March 23rd, 2009, 11:18 AM
Registered User
 
Join Date: Mar 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default IE8 and the Menu

Hi

I am using (non-Beta) Internet Explorer 8 and can not see the menu subitems - they just display as white boxes as if there was no CSS style applied. This also happens on the www.planetwrox.com website. If I turn on compatability mode then the menu system works as intended. Any ideas?
  #2 (permalink)  
Old March 23rd, 2009, 11:40 AM
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

There's been a few posts raised on this around the web - just google "ie8 asp.net menu". There are a few workarounds on an MSDN blog at http://blogs.msdn.com/giorgio/archiv...ite-issue.aspx

Phil
  #3 (permalink)  
Old March 23rd, 2009, 11:43 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The way IE8 renders is different from previous versions. The asp:Menu assumes incorrect defaults with regards to the z-index of the menu items. The ASP.NET team seems to be working on a fix for this problem.

In the mean time, take a look here to learn how you can work around the issue yourself: http://blogs.msdn.com/giorgio/archiv...ite-issue.aspx

In your case, you can fix the Planet Wrox site as follows:

1. In MasterPage.master add a new DynamicMenuStyle item like this:
Code:
 
<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" ....>
  <DynamicMenuStyle CssClass="DynamicMenuStyle" />
  ...
Next, in Monochrome.css for the Monochrome theme add the following selector:

.DynamicMenuStyle
{
z-index: 1000;
}

I'll fix the live version of PlanetWrox.com....

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!
The Following 2 Users Say Thank You to Imar For This Useful Post:
rwest (March 23rd, 2009)
  #4 (permalink)  
Old March 24th, 2009, 11:26 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The fix for the menu has now been released by the ASP.NET team: http://weblogs.asp.net/bleroy/archiv...available.aspx

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!
  #5 (permalink)  
Old March 24th, 2009, 11:33 AM
Registered User
 
Join Date: Mar 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks very much for your help Imar. It looks like my question was timed perfectly with the fix from MS
  #6 (permalink)  
Old February 28th, 2010, 04:29 PM
Registered User
 
Join Date: Jan 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Thank you Imar

This is very helpful and timely.

regards
  #7 (permalink)  
Old April 23rd, 2010, 06:39 PM
Registered User
 
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much!
It works in IE8
But can you please get it to work well in google chrome?
Thank you.
  #8 (permalink)  
Old April 24th, 2010, 01:16 AM
Friend of Wrox
Points: 752, Level: 10
Points: 752, Level: 10 Points: 752, Level: 10 Points: 752, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2009
Posts: 165
Thanks: 5
Thanked 6 Times in 6 Posts
Arrow

Quote:
But can you please get it to work well in google chrome?
The solution provided by Imar that is setting the z index value works fine for Google Chrome too.

Without setting z -index you will be getting level navigation in Chrome and not the smooth dropdown one. So using
Code:
.DynamicMenuStyle
{
z-index: 1000; 
}
works fine in every browser. However any positive value for z index will work fine.

Hope this helps.

Cheers,

Jack
__________________
Jack: Founder, Developer & Owner Of JackAndGenieForever.Com
  #9 (permalink)  
Old April 24th, 2010, 11:30 AM
Registered User
 
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jack_hilary View Post
The solution provided by Imar that is setting the z index value works fine for Google Chrome too.

Without setting z -index you will be getting level navigation in Chrome and not the smooth dropdown one.
Weird ...
It's still not working on Google Chrome.

That's how it works in IE8 all good:
http://img40.imageshack.us/img40/7407/nonamea.png

That's how it works on Google Chrome is not good:
http://img687.imageshack.us/img687/3017/noname2.png
  #10 (permalink)  
Old April 24th, 2010, 01:15 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The patch affects mainly IE 8. After applying the patch on the server, for Chrome you need to add the following to Pre_Init in the BasePage:

Code:
 
if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
{
  Page.ClientTarget = "uplevel";
}
For some reason, Chrome is seen as a downlevel browser.

For more details and the original code: http://www.google.com/support/forum/...6ec06af7&hl=en

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
CH 15 Context Menu - Element Menu Items Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 2 November 9th, 2008 03:53 PM
how create menubar, menu, menu item in xsl vijayanmsc XSLT 1 June 5th, 2006 06:43 AM
Menu Help in statusbar at mousemove over Menu item Kaustav VB Components 1 September 14th, 2005 09:28 AM
right click menu hidden by drop-drown menu Andraw HTML Code Clinic 0 March 18th, 2005 03:28 PM
Changing Menu made with VB 4 Menu Editor Zooker VB How-To 1 July 26th, 2003 11:44 PM





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