2.3.4.4 element.style issue with horizontal menu

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
6/10/2010 10:48:09 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

2.3.4.4 element.style issue with horizontal menu

Hi Joe and all, I just upgraded to 2.3.4.4 from 2.3.4.1. We have a "home brew" skin with a horizontal menu that's suddenly styled differently under this new release. The active menu items look the same as they always have, but the blank area to the right of the links is now not picking up the correct color. I traced the issue back with Firebug, and I see there is a "float: left" directive in an element.style section for ctl00_SiteMenu1_ctl00. If I turn that directive off in Firebug, the color is correct across the whole menu bar. The problem, of course, is that element.style is being set somewhere outside of the CSS, and I don't know how (or if) I can override it.

Any ideas how I can fix this?

Thanks!

Jamie

6/10/2010 10:59:07 AM
Gravatar
Total Posts 18439

Re: 2.3.4.4 element.style issue with horizontal menu

Hi Jamie,

It happens because under .NET 4 they add some javascript to the menu that seems to set some styles. In several of the included skins I encountered issues with the menu rendering. The solution that worked for me was to use !important on the css rules to make it override the javascript. The trick is to figure out which css rules need it using Firebug to look at what the rendered styles are.

There is a way to make it render as it did in 3.5 from Web.config on the <pages you could change this to 3.5

controlRenderingCompatibilityVersion="4.0"

however that affects all controls not just the menu so it is much better if you can fix it from css and you should be able to fix it from css

Hope it helps,

Joe

6/10/2010 11:12:34 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: 2.3.4.4 element.style issue with horizontal menu

Hey Joe, I now see where you were able to fix this exact problem by adding

width: 100% !important

to div.AspNet-Menu-Horizontal. That worked like a charm for me as well. Thanks for pointing me in the right direction!

Jamie

You must sign in to post in the forums. This thread is closed to new posts.