Consider using <span>
instead of <p>
#imagecaption {
position:absolute;
left:0; right:0; bottom:0;
padding-right:10px; /* avoids box sizing issue */
text-align:right;
background:#000; /* for compatibility, use background not background-color */
background:rgba(0,0,0,0.6);
}