Menu problem in Google Chrome

Last post 10-16-2009 6:41 AM by jeremydramos. 3 replies.

Sort Posts:

  • Super Angry [8o|] Menu problem in Google Chrome

    04-01-2009, 9:58 PM
    • Member
      25 point Member
    • SQLFred
    • Member since 07-20-2006, 9:02 PM
    • Posts 4

    Hi there,

     I used small business starter kit, modified it for my project, it validates at W3C CSS Validation Service, and looks great in IE 7.0.

    PROBLEM: Google Chrome does not draw the menu correctly - it is pushed to the right and jumbled.

    Has anyone solved this problem?

    I appreciate any response.

     

  • Re: Menu problem in Google Chrome

    04-01-2009, 10:13 PM
    • Member
      596 point Member
    • jameswright
    • Member since 08-28-2008, 3:56 PM
    • Morgantown, WV
    • Posts 137

    Ah, yes. Google Chrome! I too have had issues programming for it.

    Unfortunately, I do not have a simple solution for Chrome specifically; however, I have found that a good solution using CSS Control Adapters. Not only for the Menu Control, but I also use them for GridView manipulation. It provides easily read markup and great CSS support!

    Here's a link to help out. I have had success with this approach in IE, FF, and yes Chrome! Let me know how it goes if you choose to implement!

     http://www.asp.net/CSSAdapters/Menu.aspx

    jameswright
    www.jwright.info

    "Never be so busy making a living that you forget to make a life."
  • Re: Menu problem in Google Chrome

    06-21-2009, 9:04 AM
    • Member
      4 point Member
    • svan25
    • Member since 05-10-2009, 11:48 AM
    • Posts 7

     Hi,

     I have same problem with Google Chrome. I looked at the example you refered but i still can't figure out how to add CSS Control Adapters to the existing code.        

            <div id="nav-main">
               <asp:Menu ID="Menu1" runat="server"
                   DataSourceID="SiteMapDataSource1"
                   Orientation="Horizontal"
                   Width="400px" CssClass="menu-main"
                   MaximumDynamicDisplayLevels="0"
                   StaticSelectedStyle-CssClass="StaticSelectedStyle" >
                   <StaticSelectedStyle CssClass="StaticSelectedStyle" />
               </asp:Menu>
                <div>&nbsp;</div>
            </div> 

    Any advice would be greatly appreciated.

  • Re: Menu problem in Google Chrome

    10-16-2009, 6:41 AM
    • Member
      5 point Member
    • jeremydramos
    • Member since 10-16-2009, 6:35 AM
    • Dublin, Ireland
    • Posts 9

    You can place the following lines of code to your Page preInit event:

    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
            If (Request.ServerVariables("http_user_agent").IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) <> -1) Or (Request.ServerVariables("http_user_agent").IndexOf("Chrome", StringComparison.CurrentCultureIgnoreCase) <> -1) Then
                Page.ClientTarget = "uplevel"
            End If
        End Sub

    Let me know how you get on with it.

     

    Regards,

    Jeremy Ramos

Page 1 of 1 (4 items)