Reputation: 20315
Right now, .link
's background is above .main
's box-shadow. How do I make it underneath?
In other words, nothing in .left
should be on top of the box-shadow.
Ideas?
Upvotes: 3
Views: 1877
Reputation: 59799
Add:
.link {
position: relative;
z-index: -10;
}
to the .link
class
Upvotes: 6
Reputation: 10030
body {
background-color: #f8f8f8;
}
.left {
float: left;
width: 100px;
height: 1000px;
}
.main {
margin-left: 100px;
height: 1000px;
box-sizing: border-box;
background-color: #fff;
box-shadow: 0 2px 4px 2px rgba(0, 0, 0, .15);
}
.link {
margin-top: 10px;
display: block;
background-color: #08C;
position:relative;
z-index: -1;
}
@Perfect Dark said right!
Upvotes: 3