11 replies [Last post]
swisspenelope
swisspenelope's picture
Offline
newbie
Switzerland
Last seen: 4 years 12 weeks ago
Switzerland
Timezone: GMT+2
Joined: 2010-05-06
Posts: 6
Points: 7

hi,

i am using joomla CMS with an artisteer template i have tweaked, not being an outright beginner at CSS.

what i want is for some of my menu items to appear on a diff colored background than the usual.

bearing in mind that joomla allows you to create a menu link that specifies a special class to be applied to it, i specified the class .bright when creating one particular menu item, then found the block in my CSS file that deals with a links (hovered, visited, etc - all that), and added the spec for the class .bright.

unfortunately it wasn't that easy! what confuses me is that the CSS file also has some blocks higher up that deal with styling of a links, followed by ul and li links.

i've tried every permutation i can of a.bright{ etc } and must be close ... but still no luck. can someone help?

p.s. see lines 792 and 1199 for two of my attempts!

regards,

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 7 weeks 2 days ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2636
Points: 1554

are you going to provide a

are you going to provide a link, or what?

swisspenelope
swisspenelope's picture
Offline
newbie
Switzerland
Last seen: 4 years 12 weeks ago
Switzerland
Timezone: GMT+2
Joined: 2010-05-06
Posts: 6
Points: 7

i thought i had done that!

i thought i had done that! here goes another try ...

doofus here did save without doing attach first. (this is a css file that i had to rename to txt before attaching.)

AttachmentSize
template.txt 34.65 KB
CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 7 weeks 2 days ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2636
Points: 1554

We cant help you without

We cant help you without having a link to the webpage in question, or at-least proving all the html

swisspenelope
swisspenelope's picture
Offline
newbie
Switzerland
Last seen: 4 years 12 weeks ago
Switzerland
Timezone: GMT+2
Joined: 2010-05-06
Posts: 6
Points: 7

okay! here

okay! here goes:

http://www.genevatimes.ch

what is wanted is for the "featured leisure" and "featured events" menu items - which are in fact separators - the only easy way i could deal with their not pointing to any content - to be a different colour from all the other separators.

thanks in advance for having a look ...

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 7 weeks 2 days ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2636
Points: 1554

why couldnt you simple give

why couldnt you simple give those two spans a new class?

.separatorTwo {
background:none repeat scroll 0 0 #7090D7; /* change this hex value */
border-bottom:1px solid #FFFFFF;
color:#FFFFFF;
display:block;
padding-left:5px;
width:150px;
}

swisspenelope
swisspenelope's picture
Offline
newbie
Switzerland
Last seen: 4 years 12 weeks ago
Switzerland
Timezone: GMT+2
Joined: 2010-05-06
Posts: 6
Points: 7

tks for the answer. that

tks for the answer.

that doesn't work in joomla because a "separator" is a different animal from a "normal" menu link, and the separator doesn't have an option that allows the user to specify a class to use. only the "normal" menu links offer that possibility.

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 7 weeks 2 days ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2636
Points: 1554

I dont have experience with

I dont have experience with Joomla, but it sounds pretty lame. Ive never heard of a CMS that doesnt allow you to go in and edit or customize html and css.

Deuce
Deuce's picture
Offline
Guru
Las Vegas, NV
Last seen: 1 year 14 weeks ago
Las Vegas, NV
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4422
Points: 1841

Are you trying to do

Are you trying to do something like this? Or am I confused?
This should change the background color of Featured Leisure to red.
#accordionMenu .item92 .separator { background-color: #f00; }

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

swisspenelope
swisspenelope's picture
Offline
newbie
Switzerland
Last seen: 4 years 12 weeks ago
Switzerland
Timezone: GMT+2
Joined: 2010-05-06
Posts: 6
Points: 7

eureka - have found a rather

eureka - have found a rather nasty hack (in my opinion) - but which involves knowing what joomla calls certain classes that exist in the component's code, not in the CSS files. will post the details here when i have got it 100% perfect.

tks in the meantime!

swisspenelope
swisspenelope's picture
Offline
newbie
Switzerland
Last seen: 4 years 12 weeks ago
Switzerland
Timezone: GMT+2
Joined: 2010-05-06
Posts: 6
Points: 7

how to make different-colored menu items

right, first of all, i found this info on the joomla templates forum:

"If you are wanting different background colors for each menu item, you will need to apply those to the individual classes (eg .item1, .item28, .item29, .item18 etc)."

as i couldn't see any .item1, .item28 etc entries in the CSS file, this idea didn't at first occur to me. with firebug i could see their existence, but wanted to avoid, if possible, referring to classes that exist as a result of the code, as opposed to coming up with a "clean" solution in the CSS.

finally, to the CSS file, i added:

.item110 .separator, .item92  .separator, .item89 .separator
{
	background-color: #143682;/*deeper blue*/
}

just below the .separator section, which gives all the other menu categories their appearance.

what makes this not "clean" in my view, is that if i delete those menu item categories (they are not really clickable menu items, as you have seen in www.genevatimes.ch), and create new ones, i will have to recreate the CSS statement to take account of the new .itemn number that the code creates.

well, this was another great learning experience!

Deuce
Deuce's picture
Offline
Guru
Las Vegas, NV
Last seen: 1 year 14 weeks ago
Las Vegas, NV
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4422
Points: 1841

@swisspenelope - That's the

@swisspenelope - That's the same concept I posted above.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph