Sat Dec 03, 2011 11:52 pm
<html>
<head>
<style type='text/css'>
#mainbar
{
background:#BBCC33;
}
#section
{
color:#fff;
background:#435234;
clear:both;
padding:0;
text-align:center;
font-size:1em;
height:2em;
line-height:2em;
}
a.testlink
{
background:inherit;
color:#FFFFFF;
text-decoration:none;
}
#section a:hover
{
text-decoration:underline;
}
</style>
<title>inherit background color from the parent element</title>
</head>
<body>
<div id="mainbar">
<div id="section">
test <a href="#" class="testlink" >link</a>
</div>
test <a href="#" class="testlink" >link</a>
</div>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.