CSS Class Names and proper identification

Hi -

We have a website where the HTML is being generated from the CMS system.  As such - the class names for various parts are predictable.

For example - we have a menu where the menu options are along the lines of:

<li class="leaf">
<a href="#">First menu item</a>
</li>
<li class="leaf">
<a href="#">Second menu item</a>
</li>
<li class="leaf last">
<a href="#">Last menu item</a>
</li>

What would the CSS line be to identify anything with "leaf" and "a"?

Sort of a generic..

.leaf a { }

?
LVL 2
erzoolanderAsked:
Who is Participating?
 
LZ1Connect With a Mentor Commented:
If you want to do both leaf and last classes then do this:

li.leaf.last a{}

Open in new window

0
 
LZ1Commented:
That would work.

You could also do li.leaf a{}
0
 
erzoolanderAuthor Commented:
And that would cover the "leaf last" classname as well?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.