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

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -