Using CSS class on LI element not on child element

More
12 years 3 months ago - 12 years 3 months ago #21347 by rowby
===================== Update ==========================
-- I was not able to get the rounded blue "CSS class on LI element" to work. So I deleted the it from the menu parameters.

Instead I tried using the menu "Normal State" paramaters. However, the rounded background color is also extending around the sub-menus. I only want the "parent" "Music Performance..." to be styled -- and its sub-sub menus untouched. :Link to temporary site

Perhaps there is a way for the "CSS class on LI element" to do this -- but it eludes me.



Rowby

======================================= Earlier version of this post ============

Hello CEd,

I am using CSS class on LI element and created a class called "rounded blue".

I based the rounded blue by copying the blackbox class, in the theme's maximenuhck.php file. The only modification is I changed the background color to blue.

However when I use the menu parameters "CSS class on LI element" it applies the background color to not only the initial menu item but also to its submenu items too. I only want the background color to apply to the "Music Performance..." link.

Here's a link to an example of what it does. Link to menu thing

If you click on "Performance Areas" and look at "Music Performance..." you will see the rounded class -- but it is extending the blue over the 6 sub-sub menus too.

Is there a way to restrict the class to only the initial element?

Thanks!

Rowby

Thanks

Rowby
Last edit: 12 years 3 months ago by rowby.

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #21352 by ced1870
Hi
this is because you have made this
- title (level2)
-- submenu (level3)
-- submenu (level3)

if you want to keep a link you must do that

- title (level2)
- submenu (level2)
- submenu (level2)

then you can style it without having the background on the whole submenu
else you can set it as separator and style it with the module styles >> heading styles
CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #21359 by rowby
Hi

I want to keep it as links. So if I kept it as below:


- title (level2)
- submenu (level2)
- submenu (level2)

I would just go into the the menu parameters and add some left padding to my "submenu" items. Like this...

title (level2)
- submenu (level2) Menu parameters (padding left: 10px)
- submenu (level2) Menu parameters (padding left: 10px)

Please confirm that this would be the "best" way to do it when keeping them all at the same level.

Thanks!

Rowby


One thought, as I am ready to submit this. What if I kept it at
- title (level2)
-- submenu (level3)
-- submenu (level3)

But added a Graphic for the Title link instead of text. Would that work? Or would the graphic surround the level 3's? I guess I could just try that, but wondering what you think about that, technically. (And I assume that graphic could have a link included.

Please Log in or Create an account to join the conversation.

Time to create page: 0.224 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1263 guests and one member online