Total members 11894 |It is currently Sun Nov 24, 2024 11:20 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:
<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>

 




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : inherit background color from the parent element
 change background color with RGB     -  
 Background color - mile200     -  
 gradient background color using CSS     -  
 skymiles background color     -  
 Follow window background color     -  
 changing the background color for site main menu.     -  
 get parent class name     -  
 advantage of the event delegation model over event-inherit     -  
 Usage of big element tag.     -  
 Pop the element off the end of array     -  



Topic Tags

CSS Background
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
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