[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

CSS Class Names and proper identification

Posted on 2012-04-11
3
Medium Priority
?
182 Views
Last Modified: 2012-04-30
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 { }

?
0
Comment
Question by:erzoolander
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Expert Comment

by:LZ1
ID: 37832930
That would work.

You could also do li.leaf a{}
0
 
LVL 2

Author Comment

by:erzoolander
ID: 37833001
And that would cover the "leaf last" classname as well?
0
 
LVL 30

Accepted Solution

by:
LZ1 earned 2000 total points
ID: 37833006
If you want to do both leaf and last classes then do this:

li.leaf.last a{}

Open in new window

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question