Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 23rd, 2009, 12:18 PM
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?
Reply With Quote
  #2 (permalink)  
Old March 23rd, 2009, 12:40 PM
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
Reply With Quote
  #3 (permalink)  
Old March 23rd, 2009, 12:43 PM
Imar's Avatar
Wrox Author
Points: 71,366, Level: 100
Points: 71,366, Level: 100 Points: 71,366, Level: 100 Points: 71,366, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,979
Thanks: 79
Thanked 1,564 Times in 1,541 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!
Reply With Quote
The Following 2 Users Say Thank You to Imar For This Useful Post:
rwest (March 23rd, 2009)
  #4 (permalink)  
Old March 24th, 2009, 12:26 PM
Imar's Avatar
Wrox Author
Points: 71,366, Level: 100
Points: 71,366, Level: 100 Points: 71,366, Level: 100 Points: 71,366, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,979
Thanks: 79
Thanked 1,564 Times in 1,541 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!
Reply With Quote
  #5 (permalink)  
Old March 24th, 2009, 12:33 PM
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
Reply With Quote
  #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
Reply With Quote
  #7 (permalink)  
Old April 23rd, 2010, 07: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.
Reply With Quote
  #8 (permalink)  
Old April 24th, 2010, 02: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
Reply With Quote
  #9 (permalink)  
Old April 24th, 2010, 12:30 PM
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
Reply With Quote
  #10 (permalink)  
Old April 24th, 2010, 02:15 PM
Imar's Avatar
Wrox Author
Points: 71,366, Level: 100
Points: 71,366, Level: 100 Points: 71,366, Level: 100 Points: 71,366, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,979
Thanks: 79
Thanked 1,564 Times in 1,541 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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 07:43 AM
Menu Help in statusbar at mousemove over Menu item Kaustav VB Components 1 September 14th, 2005 10: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 27th, 2003 12:44 AM



All times are GMT -4. The time now is 03:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.