Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:03

a clue for the background-color bug


Poster: boneski
Dated: Monday June 19 2006 - 12:50:24 BST

Hi, I've noticed other people have also been hitting inconsitent background colour problems with the menu incorrectly picking up default table, tr and td background-color css, because it ignores the specified attributes like onbgcolor and onclass.

I've tracked down the trigger, it's the usage of subimage. When removed, the background colour works correctly.

Using your css_example.htm and removing/adding the line:
Code:
subimage="arrow.gif";
under menuStyle7a, I can toggle the bug in firefox, IE and Konq with the "Anti Spam Tools" submenu under Links.

I hope this helps you find the problem in the menu code. :)


Poster: Ruth
Dated: Monday June 19 2006 - 19:53:07 BST

Hi boneski,

Thanks so much for the info, I will pass it on to Milonic.

Ruth


Poster: Andy
Dated: Wednesday June 28 2006 - 14:36:32 BST

Hi,

Do you have any code that we can see where this problem occurs?

A URL is preferable

Cheers,
Andy


Poster: boneski
Dated: Wednesday June 28 2006 - 22:18:23 BST

Hi Andy,

grab and extract this: http://support.milonic.com/beginners/css_styling/css_style.zip

To css_menu_codes.css add:
Code:
table {background-color: #ff0000}

(tr and td have the same results)

View css_example.htm in your browser, gross eh? But look at style 7, and the "Links" menu. Notice how the bottom option "Anti Spam Tools" doesn't get the background image when you move the mouse to it?

Now, from css_style_data.js remove the line
Code:
subimage="arrow.gif";
from menuStyle7a, and refresh the page. Notice that "Anti Spam Tools" now has the background image.

Add the subimage line back, and away goes the background image again.

Basically, the menu does not set the background attributes (despite them being specified in multiple ways) when it uses "subimage". As soon as subimage is removed, everything works as expected. These something about subimage that makes it default to the default table, tr, and td css attributes.


Poster: Ruth
Dated: Thursday June 29 2006 - 6:06:48 BST

Hi,

Andy will have to check this, but one thing should be noted, the generic css table codes used in a style sheet sometimes cause conflict problems with the menu. Most likely this is because the menu has tables, divs spans etc. We usually suggest that such codes are written as classes rather than using the generic for table, and I think margin is one that also can cause a problem in some instancesz. Those are the only two I've noticed, though I've not tested every possible css code...

Ruth


Poster: boneski
Dated: Thursday June 29 2006 - 13:38:18 BST

That's right Ruth. But I'm pretty sure it shouldn't ignore what you specifiy for background colours and images in the menu code, purely on the basis of whether you use subimage. Smells like a bug to me. :D