I'm struggling to make a photo expand when hovered over without it expanding under the existing content. My current HTML and CSS code is as follows:
.userCard {width:360px;height:180px;border:1px solid black;float:left;margin:10px;position:relative;font-size:12px;background-image: url('paper.jpg')}
div:first-child {
opacity: .99;
}
.zoom:hover {
transform: scale(3);
transform-origin: top left;
}
<div class="userCard">
<table class="myTable" width="100%" cellspacing="0" height="100%">
<tr valign="top">
<td width="25%" style="padding:0px;" bgcolor="#E6E6E6">
<div class="zoom" style="background-color:white;"> <h1>
PHOTO
</h1>
</div>
</td>
<td width="75%">
<b>A N Employee
<div style="position:absolute;bottom:15;z-index:1000;right:15;font-family:arial;">
<table border="1" cellspacing="0" width="100%" style="font-size:14px;">
<tr>
<td style="padding:3px;line-height:10px">AM</td>
<td style="padding:3px;line-height:10px" bgcolor="" class="" >12/11</td>
<td style="padding:3px;line-height:10px" bgcolor="" class="" >13/11</td>
<td style="padding:3px;line-height:10px" bgcolor="" class="" >14/11</td>
<td style="padding:3px;line-height:10px" bgcolor="" class="" >15/11</td>
<td style="padding:3px;line-height:10px; background: repeating-linear-gradient(45deg, #c6cef4, #c6cef4 10px, #d7dbef 10px, #d7dbef 20px);" bgcolor="gray" class="" >16/11</td>
</tr>
<tr>
<td style="padding:3px;line-height:10px">PM</td>
<td style="padding:3px;line-height:10px" bgcolor=""> </td>
<td style="padding:3px;line-height:10px" bgcolor=""> </td>
<td style="padding:3px;line-height:10px" bgcolor=""> </td>
<td style="padding:3px;line-height:10px" bgcolor=""> </td>
<td style="padding:3px;line-height:10px; background: repeating-linear-gradient(45deg, #c6cef4, #c6cef4 10px, #d7dbef 10px, #d7dbef 20px);" bgcolor="gray"> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
I read an article about using the first-child CSS rule but that didn't solve my issue.
Source
I've created a fiddle where I need help - thank you!
https://jsfiddle.net/d76xkyou/1/