|
|
 |
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, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |
|

March 23rd, 2009, 11:18 AM
|
|
Registered User
|
|
Join Date: Mar 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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?
|

March 23rd, 2009, 11:40 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 153
Thanks: 2
Thanked 32 Times in 32 Posts
|
|
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
|

March 23rd, 2009, 11:43 AM
|
 |
Wrox Author
Points: 56,213, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 14,341
Thanks: 47
Thanked 985 Times in 969 Posts
|
|
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
|
|
The Following 2 Users Say Thank You to Imar For This Useful Post:
|
|

March 24th, 2009, 11:26 AM
|
 |
Wrox Author
Points: 56,213, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 14,341
Thanks: 47
Thanked 985 Times in 969 Posts
|
|
The fix for the menu has now been released by the ASP.NET team: http://weblogs.asp.net/bleroy/archiv...available.aspx
Imar
|

March 24th, 2009, 11:33 AM
|
|
Registered User
|
|
Join Date: Mar 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Thanks very much for your help Imar. It looks like my question was timed perfectly with the fix from MS 
|

February 28th, 2010, 03:29 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you Imar
This is very helpful and timely.
regards
|

April 23rd, 2010, 06:39 PM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you very much! 
It works in IE8
But can you please get it to work well in google chrome?
Thank you.
|

April 24th, 2010, 01:16 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2009
Posts: 165
Thanks: 5
Thanked 6 Times in 6 Posts
|
|
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
|

April 24th, 2010, 11:30 AM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by jack_hilary
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
|

April 24th, 2010, 01:15 PM
|
 |
Wrox Author
Points: 56,213, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 14,341
Thanks: 47
Thanked 985 Times in 969 Posts
|
|
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |