Reputation: 6364
What is the correct way to select a link of a certain class within a body of specific class. For example my body has the class "abc" and my link has the class "efg", what would my css code look like? (I'm trying to create active links for a Magento block)
Upvotes: 0
Views: 74
Reputation: 3117
Check this example
<html>
<head>
<style>
.outer
{
background-color: red;
height: 40px;
margin: 10px;
}
.inner
{
background-color: blue;
height: 20px;
margin: 5px;
}
.outer .inner
{
background-color: green;
}
</style>
</head>
<body onload="loadCars()">
Check div style.
<div id="mydiv" class="inner">
</div>
</div>
<div id="mydiv" class="outer">
<div id="mydiv" class="inner"></div>
</div>
</body>
</html>
Save the above code in an html file and open it.
Upvotes: 0
Reputation: 9469
You should write something like this:
.abc .efg {
/*Your CSS Rules*/
}
Upvotes: 0
Reputation: 43850
You have to do some research
body.abc a.efg {
rules
}
even w3c can help you with that
Upvotes: 0
Reputation: 26783
body.body_class a.link_class
This question is a bit basic - you should try to learn this stuff a bit.
Upvotes: 1