MyBB Community Forums

Full Version: Pure CSS Drop-Down Menus
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Yes I realise that there are numerous threads about drop-down menus and I've read some tutorials. However, I'm more interested in Pure CSS Menus. I find that they are quicker and easier but not to earlier browsers.



Pure CSS menus use the <li> and <ul> tags as the core system but as it turns out, MyBB uses those same tags in the header. That's where I'm having issues. I try to assign a block a new class, but the MyBB CSS overrides it.

Here's the basic drop-down menu that I'm adding to my normal forum bar.
<li class="topmenuli"><a href="#"> Drop Down Menu </a></li>
	<ul class="submenuul">
		<li class="submenuli"><a href="#"> Item </a></li>
		<li class="submenuli"><a href="#"> Item </a></li>
		<li class="submenuli"><a href="#"> Item </a></li>
		<li class="submenuli"><a href="#"> Item </a></li>
	</ul>
</li>
As you can see, submenuli, topmenuli, etc. all clash with the forum's CSS.



So my question is - how can I assign each button on my navbar a class instead of applying the CSS to all <li> tags?

Thank you Smile
I'm going to try to move it to the "member bar" which doesn't have any li or ul tags.
Just add the class to the global css.
Doesn't the CSS add the attributes to all ul and li codes in the navbar section? I'll try it anyway, though.
Cant you just define it like this.

topmenuli.li {

}
I assumed the default CSS would override it.
There! I took your advice NetSage. Thank you!