Can I stop the menu from reading my CSS?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Can I stop the menu from reading my CSS?

Post by vikenk »

Hello all,

One thing that I've noticed about the menu is that it picks up on CSS command very easily, especially those that are in the <body> styling. This happens not so much in IE, but in FF and Opera. I've noticed that the menu doesn't always appear the same in FF and IE. Once particular example is that menu items appear taller (or bigger) in FF and IE, especially those with images in them.

I started playing around with my CSS and found that I had a line-height statement in the body tag of my CSS. Here's my CSS.

body {
background: black;
color: white;
text-align: left;
font-family: arial, verdana, "times new roman", serif;
font-size: 95%;
margin: 0;
padding: 0 0 0 260px;
line-height: 110%;
}

This had a direct impact on the menu in FF and Opera, but not in IE. IN the body tag, the line-height and font-size statements had a direct impact on the menu in FF and Opera but not in IE. When I moved the line-height and font-size statements into the "P" tag in my CSS, the did *not* impact the Menu.

So far, I can tell that generic styling of tables has an impact on the Menu (you can read that in my previous posts), so do line-height and font-size statements in the <body> tag (probably because statements in the <body> tag are inherited).

Is there any way to prevent the menu from reading my CSS styling? That way I know that the Menu and Website can be styled independently.

Thanks in advance,

Viken K.
tootricky
Advanced
Advanced
Posts: 28
Joined: Tue Dec 07, 2004 4:07 pm

Post by tootricky »

no way to prevent the menu from reading the css file I think but you could change your body to a class:

.body {

attributes...

}

and then

<body class="body">

I think this should work.
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

That's a good idea. I'll give it a try. Thanks!

Viken K.
Post Reply