Clicking on menu item in Chrome does nothing
Evening all,
I am struggling with a couple of problems that I could do with your help with. I apologise if these have been covered in other pages, if they have could you point me in the direction of those pages. The problems are as follows:
- I've got a simple website that contains a master page with a menu on it. The menu works fine with IE and Firefox but when I try it in Chrome clicking the menu doesn't seem to work.
Here is how I have set the menu up:
How do I get the click on the menu to display the correct page?
<asp:Menu ID="Menu1" runat="server" Height="16px" Orientation="Horizontal"
style="margin-top: 0px" Width="917px">
<Items>
<asp:MenuItem ImageUrl="~/Images/MenuHome.jpg" NavigateUrl="~/Default.aspx"
></asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuMenu.jpg" NavigateUrl="~/Menu.aspx"
></asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuP开发者_如何学JAVAriceList.jpg" NavigateUrl="~/PriceList.aspx"
></asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuOrdering2.jpg"
NavigateUrl="~/Ordering.aspx" >
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuOccasions.jpg"
NavigateUrl="~/Occasions.aspx">
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuWeddings2.jpg" NavigateUrl="~/Weddings.aspx"
></asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuEvents.jpg" NavigateUrl="~/Events.aspx"
></asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuGallery.jpg" NavigateUrl="~/Gallery.aspx"
></asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuContactUs.jpg"
NavigateUrl="~/ContactUs.aspx" >
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/Images/MenuBlog.jpg"
NavigateUrl="~/dasblog/default.aspx" >
</asp:MenuItem>
</Items>
</asp:Menu>
- The menu is wrapping round on to two rows, how do I keep it on a single row?
Thanks for the help.
After some more digging I have found the solution. The answer can be found here: http://forums.asp.net/p/1369765/2860698.aspx#2860698
I've copied the bits you will need and pasted it in here:
You need to add an App_Browsers folder to the project and add a new item Add New Item... Select "Browser File" and name it Chrome.browsers. Comment out the default stuff and insert this from the link above:
<browsers>
<browser refID="safari1plus">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
</controlAdapters>
</browser>
</browsers>
This will make the menu work, and it also stops it from wrapping around.
精彩评论