CSS overiding menu settings

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mcai7gh2
Advanced
Advanced
Posts: 10
Joined: Mon Oct 20, 2003 1:23 pm

CSS overiding menu settings

Post by mcai7gh2 »

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!

:|
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

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.
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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

Cheers
Andy
mcai7gh2
Advanced
Advanced
Posts: 10
Joined: Mon Oct 20, 2003 1:23 pm

Post by mcai7gh2 »

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.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
mcai7gh2
Advanced
Advanced
Posts: 10
Joined: Mon Oct 20, 2003 1:23 pm

Post by mcai7gh2 »

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.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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?
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
mcai7gh2
Advanced
Advanced
Posts: 10
Joined: Mon Oct 20, 2003 1:23 pm

Post by mcai7gh2 »

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
Post Reply