...

View Full Version : Resetting styles



Jan
02-23-2005, 12:49 PM
Hi there!

I have this fairly simple problem that I hope someone could help me out with. Let's say I have a two-level menu consisting of two unsorted lists where the second one is inside the first, like so:


<ul id="nav">

<li>Item 1</li>
<li>Item 2</li>
<li>

Item 3

<ul id="subnav">
<li>Item 3a</li>
<li>Item 3b</li>
<li>Item 3c</li>
</ul>

</li>

</ul>

Now, when I apply styles to #nav, this will also affect elements in #subnav (atleast it's doing so for me). Am I doing something wrong, and if not, is there a way of resetting the styles for #subnav, so that I can create completly independent styles for it?

Any help is greatly appreciated!

ronaldb66
02-23-2005, 02:10 PM
Without seeing the styles it's guessing, but I guess you're using descendant selectors (since IE doesn't support much else) which causes some styles to effect the second level list unintentionally, though correctly.
The only bullet-proof way would be to override the styles for the second list using the subnav id.

If you can supply your styles, we could offer more definitve answers.

Jan
02-23-2005, 06:58 PM
Override, that's the word I was looking for. I actually tried overriding the styles for the second list, with successful results! Thanks a million for your assistance, Ronald. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum