javascript - Position some text behind a div -


i needed position text centered horizontally , vertically relative 'dropzone' (a div). works solution: inject text above div centered horizontally , vertically

the jsfiddle: http://jsfiddle.net/upyyh/4/

var $span = $('<span/>').text('hello, world'); $('body').append($span); $span.position({ of: $('.dropzone') }); 

now need have text behind dropzone. (and i'll set dropzone opacity of .5 example). don't know if possible didn't found way it.

why doing it? have text ('drop files here') showed behind dropzone area not interfere dropzone.

any idea?

thanks.

try with:

.dropzone { background: silver; height: 300px; padding: 5px; border: 2px solid rgb(255, 165, 0); opacity: 0.8; } 

and

$span.css('z-index', -1); 

or add css rule bright:

.bright{    z-index: -1; } 

demo


Comments

Popular posts from this blog

mysqli - Php Mysqli_fetch_assoc Error : "Warning: Illegal string offset 'name' in" -

html - Cut text on left side inside button while centering -

php - Hide Categories from WordPress Dashboard by ID and Custom Post Type -