Separate style for sub1

tevart

Avatar: tevart

2009-10-07 13:03

I'm trying to set separate style for each submenu (dropdown).

I now have this

ul#menu1 li a {background:white;}

that works for all dropdown menus, but if i wan't to style certain submenu i tried this

ul#menu1 .id25 li a {background:#ccc;}

and it doesn't work.

Any idea? This works fine within root menu, like #menu1 .id24 a

tnx

» Quick.Cms v2.x

Makaron

Avatar: Makaron

2009-10-07 15:11

Try this:
ul#menu1 .l25 li a {background:#ccc;}

tevart

Avatar: tevart

2009-10-08 08:30

Nope..it doesn't work.

Here's html code of the menu if it helps. If


<ul id="menu1"><li class="l3  id24"><a href="test3,24.html">test3</a><ul class="sub1"><li class="l1  id25"><a href="subtest1,25.html">subtest1</a></li></ul>



tnx

Makaron

Avatar: Makaron

2009-10-08 14:58

Why You added second class to these elements? You have two space characters and it can cause problems. If You want to select submenu element You can try that:

#menu1 .l3 .sub1 .l1 a{}

tevart

Avatar: tevart

2009-10-09 22:55

I'm using code that someone published here for the dropdown menus. It adds <ul class="sub$aData[iDepth]"> to the menu_1.tpl

I have removed one space char, but still doesn't work. I'm trying all sorts of combinations, but no success. Any more ideas?

tnx

tevart

Avatar: tevart

2009-10-09 23:03

Ok..let me explain my problem, maybe there is some other way.

i wan't to add country flags to each name in the submenu. I think that best way would be to add each country to it's own style and add images as background. So, is there any other way i can achive this?

Here's screenshot of the menu now
http://www.shrani.si/f/3t/Fl/2bGNL1A8/graphic2.jpg

tnx

about us | contact