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

CSS overiding menu settings


Poster: mcai7gh2
Dated: Monday October 20 2003 - 13:42:54 BST

Great menu! Really helped me out and is now used as a company wide standard, :D but...

I don't know if anyone else has had this problem; I have many sites using the DHTML menu and certain CSS styles are overiding the menu styles. :(

I have got around most of them, but one particular problem is that in version 5 I am setting the menu background color to grey, but have a background color of white set on td which changes the menu as well. I did not have the same problem in version 3.

Can anyone help? Will this be fixed in the next version? ARG!

:|


Poster: fredlongworthhighschool
Dated: Tuesday October 21 2003 - 16:41:01 BST

I had a similar sort of problem. If you go to

http://www.flhs.org.uk/colors.css

you can look at my CSS file in relation to my pages.


Poster: Andy
Dated: Tuesday October 21 2003 - 17:27:55 BST

Send us a URL of the problem so that we can track it down, it's probably something simple.

Cheers
Andy


Poster: mcai7gh2
Dated: Tuesday October 21 2003 - 17:36:16 BST

Thanks Andy, will look into that!

The URL I have tried it on so far is http://www.oxfordshire.nhs.uk/ but I have disabled it for now as it was not working correctly. You could try using the converter to see the problem?

Thanks.


Poster: Hergio
Dated: Tuesday October 21 2003 - 23:00:43 BST

Just a word of caution, its not the best idea to lock in the colors of something as common as a td tag in your styles. The reason being it causes problems just like you are seeing. Maybe if you in your css file set the body background color to white then all tds would also be white by default, unless overridden by something such as the menu.

Andy what is sounds like is maybe when your menu creates the td's for the menu items, and a css style is specified in the menu code, do you put it in the td tag itself? As in <td class="blah"> or do you put it somethere around it, like say in a span surrounding the td or table? Because the only way I think you can override this person's setting of white to all td's is to physically put a class definition INTO the td.


Poster: Maz
Dated: Tuesday October 21 2003 - 23:19:26 BST

uh oh... I have td styles in php.
I replaced front end tables for no tables css, I think I got it 8)

Now I have to learn php layout. :|

Warm regards
maz


Poster: mcai7gh2
Dated: Wednesday October 22 2003 - 10:55:06 BST

Hi Hergio,

Unfortunately I have to set the body color to a different color and that is why I have set the td color. I could add a seperate class to my stylesheet and add it into the td that I need the color, but it is going to be a massive amount of work, and I wanted to make sure there was no likelyhood of your code changing so that it ignored my current classes.


Poster: Hergio
Dated: Friday October 24 2003 - 1:34:03 BST

Ok then this may be a bug. Its because andy uses tables in part to create the menu and obviously that means hes using tds. These tds he has are using your style because the style affects all tds...it does not care if they are in the menu or not. And I dont think andy is setting the class of these TDs so they are using your style. Hmmm, I am not sure how to go about this. Hey, Andy, is there a way you can fix this? Like possibly by default have all your tds in the menu use class="mmenuTD" so that if a person wants to override things in your menu TDs, all they have to do is set some properties to a style called mmenuTD. Hows that sound?


Poster: mcai7gh2
Dated: Friday October 24 2003 - 11:10:32 BST

Hi Hergio,

That would help me out a lot and would mean that it would make your menu a complete seperate entity. ;)

Something that I did notice between v3 and v5 is that v3 used to get effected by my link classes, but when I converted to v5 they don't. This is good news as I had to do a "fix" on this. :D