html - Vertical-align middle for block inside div -
i'm having trouble vertical-align: center <p>
inside <div>
. there nothing more explain link jsfidle i'm jsfiddle link
edit: please remember there `
.cover-price p{ width: 100%; height: 50px; background-color: rgba(0,0,0, .3);`
so there small blackbackground price.
i added "position:absolute;" attribute-value css sheet along "margin-top:170px; (which effects 170 in relation imaged div)
.cover-price{ height: 300px; width: 300px; background-repeat: no-repeat; background-size: cover; *position:absolute;* } .cover-price p{ margin: auto 0; width: 100%; background-color: rgba(0,0,0, .3); color: white; *margin-top:170px;* }
let me know if helps @ all. is, of course, placing $20.00 in middle of image (i hope that's want).
Comments
Post a Comment