diafygi
03-07-2007, 04:21 PM
Hello all,
I am trying to show a background of a grandparent <div>. I've included a nice little example that you can try yourself.
<html>
<head>
<style type="text/css">
div.background_1{ background-color: blue;
padding: 20px;}
div.background_2{ background-color: pink;
padding: 20px;}
a.link{ padding: 10px;}
a.link:hover{
/* Instead of white, */
/* is there any way */
/* to show background_1? */
background-color: white;}
</style>
</head>
<body>
<div class="background_1">
<div class="background_2">
<a href="#" class="link">Link1</a>
</div>
</div>
</body>
</html>
Instead of background colors, however, the backgrounds would be images. I know I can just crop background_1 and insert it as an image, but that would be too easy wouldn't it? Is there any way I can simply see through to background_2?
Thanks ya'll!
I am trying to show a background of a grandparent <div>. I've included a nice little example that you can try yourself.
<html>
<head>
<style type="text/css">
div.background_1{ background-color: blue;
padding: 20px;}
div.background_2{ background-color: pink;
padding: 20px;}
a.link{ padding: 10px;}
a.link:hover{
/* Instead of white, */
/* is there any way */
/* to show background_1? */
background-color: white;}
</style>
</head>
<body>
<div class="background_1">
<div class="background_2">
<a href="#" class="link">Link1</a>
</div>
</div>
</body>
</html>
Instead of background colors, however, the backgrounds would be images. I know I can just crop background_1 and insert it as an image, but that would be too easy wouldn't it? Is there any way I can simply see through to background_2?
Thanks ya'll!