Splash Theme Internet Explorer Menu Problem

Splash Theme Internet Explorer Menu Problem

by Samantha Ashton -
Number of replies: 6

Hi,

We are using Moodle 2.1 and currently customoising the Splash theme to match our corporate colours and logos etc.

I have got the theme working perfectly in Firefox, but in Internet Explorer 6, 7 and 8, the menu isn't appearing correctly. I have looked at the CSS and I seriously can't work out what needs changing.

In Internet Explorer, it seems to have this white gradient background, and a different colour when you hover over it. If you would like to see it, you should be able to access it by using: https://vletest.sthelens.ac.uk/

Any help would be absoloutely brilliant.

Thank you in advance,
Sam

Attachment ie-firefox.jpg
Average of ratings: -
In reply to Samantha Ashton

Re: Splash Theme Internet Explorer Menu Problem

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Samantha,

The problem is known to the developers, it is casued by the lazy load of IE and nothing to do with any of the themes in Moodle.

If you open IE and view your site, then click on F12 (function key) you will the screen you are viewing will split horizontally and in the lower half of the screen you will see the HTML source for the page. You should also see a tab marked "CSS"  click on it.

Now the HTML changes to a list of CSS selectors and properties.

Just below the CSS tab you will see an 'arrow' another icon with a red X through it,(this is the clear cache icon), next to that the nornal 'save file' icon and next to this a drop-down menu which has if you open this you will see a selection of style.php urls amongst which is a set of YUI-combo.php files. If you click on the last of these the CSS canges to the YUI CSS used for the menu.

If you look closely down this CSS list you will see one of the properties of background-image: as a sprite.png

Go down this list and un-check the 'tick-box' at the side of this all those YUI CSS selectors whose property is this sprite.png image. Eventually you will get to the one which is causing the white overlay effect in the menu. When you find this make a note of the YUI CSS selector and add this to the CSS stylesheet for your custom splash theme.

You will need to add this to make sure it disables it...

.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label {
    background-image: none!important;
}

You will find also that the following CSS is used for all the hover instances where the blue might appear, so as a test add this and where ever you see "red" as a background you will know the CSS you have running will over-ride the YUI CSS, just change the RED to a color of your choice.

div.yui3-menu.custom_menu_submenu .yui3-menu-content li a:hover,
.yui3-skin-sam .yui3-menu-label-active,
.yui3-skin-sam .yui3-menu-label-menuvisible,
.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-active,
.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-menuvisible,
.yui3-skin-sam .yui3-menuitem-active .yui3-menuitem-content,
.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content,
.yui3-menu-content li:hover  {  background-color: red; }

Some times I use red, yellow, green and blue and other colours to test where each one goes... so if you split them up and add them as seperate items you will see which colour is used in the menu.

div.yui3-menu.custom_menu_submenu .yui3-menu-content li a:hover{  background-color: red; }
.yui3-skin-sam .yui3-menu-label-active{  background-color: yellow; }
.yui3-skin-sam .yui3-menu-label-menuvisible{  background-color: green; }
.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-active{  background-color: blue; }
.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-menuvisible{  background-color: orange; }
.yui3-skin-sam .yui3-menuitem-active .yui3-menuitem-content {  background-color: purple; }
.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content {  background-color: white; }
.yui3-menu-content li:hover {  background-color: gray; }

By adding all the above group of CSS items you will be able to (hopefully) make sure the menu works like YOU want it to.

I hope this helps?

Mary


Average of ratings: Useful (1)
In reply to Mary Evans

Re: Splash Theme Internet Explorer Menu Problem

by Samantha Ashton -

Firstly, thank you for taking the time to type all that out.

Secondly, this has managed to more or less sort it. Obviously, it's not fixed completley and looks slightly different from Firefox, but staff will now be able to read the text.

Thank you so so much for all your help and assistance.

Sam

In reply to Samantha Ashton

Re: Splash Theme Internet Explorer Menu Problem

by Samantha Ashton -

I take it back...just done some more amendments, and now both menus look exactly the same.

You are an absoloute star. THANK YOU SO SO MUCH!!! smile

In reply to Samantha Ashton

Re: Splash Theme Internet Explorer Menu Problem

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

You are welcome...as for typing it all out...I just cut and pasted most of it! smile

It's perhaps time I looked at base and canvas themes and see if I can add the code in there.

Thanks for the FEEDBACK which is good as this helps fix the issues.

Cheers

Mary

In reply to Mary Evans

Re: Splash Theme Internet Explorer Menu Problem

by Samantha Ashton -

I am having 1 further issue with the menu. I have got it working brilliantly in firefox and in IE 7 & 8. However, there are a number of our staff that still use IE6 and the VLE menu isn't working correctly in it.

I had to do some tweaking of the code to get it align right for IE7&8. To do this, I amended the  #dropdownmenu in the ie.css file. I have checked the code that was already in it, and tried the following: 

.ie6 #dropdownmenu {        /* holder for custom menu */
    height:45px;
    margin: 0;
    padding-top: 0px;
    position: relative;
    top: 20px;
    left: 5px;
    z-index: 9999;
}

However, this doesn't seem to have worked. Do you know how I would be able to change the menu for IE6?

Thanks, Sam

In reply to Samantha Ashton

Re: Splash Theme Internet Explorer Menu Problem

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Sam,

It is very difficult to get any kind of dropdown menu to work in IE6.

The problem with the IE6 is that it does not support the 'hover' function which is what the dropdown menus use.

The only way round this would be to use the same menu you used in your Moodle 1.9 version.

If your staff use IE6 then tell them to download FireFox so they can use the college website. If they don't then I will write a letter to the editor of the LEP and expose them! LOL

Mary