Question
box-shadow on top of children
How do I get an inset CSS3 box-shadow
to render on top of its children elements?
Problem:
HTML:
<div id="chatroom">
<div class="chatmessage"><b>User 1:</b>Test</div>
<div class="chatmessage"><b>User 2:</b>Test</div>
<div class="chatmessage"><b>User 1:</b>Test</div>
<div class="chatmessage"><b>User 2:</b>Test</div>
</div>
CSS:
#chatroom{
border: 1px solid #CCC;
height: 135px;
font-size: 0.75em;
line-height: 1.2em;
overflow: auto;
-moz-box-shadow: inset 0 0px 4px rgba(0,0,0,.55);
-webkit-box-shadow: inset 0 0px 4px rgba(0,0,0,.55);
}
.chatmessage{
padding: 4px 2px;
}
.chatmessage b{
margin-right: 2px;
}
.chatmessage:nth-child(2n) {
background: #EEE;
}