Wednesday, February 22, 2012

Text On image HTML,css - Stack Overflow

Text On image HTML,css - Stack Overflow: "Create a div that is the dimensions of your image. Then place your text inside. Use margins/padding on your text to get it vertically-centered, and set text-align to "center" for its css.

.imgBox  { width:300px; height:100px; background-image:url('bg.jpg'); }
.imgText { text-align:center; margin:0; padding:25px 0 0 0; }

 

Hello World


"

'via Blog this'