Embedded Images as background of div
Posted: Wed Dec 29, 2010 3:22 pm
Hello everyone.
I was trying to make the embedded image as background of one of my divs >
The <img> is working but the div has no background img.
any idea how to make the img as background?
thanks
I was trying to make the embedded image as background of one of my divs >
Code: Select all
$message->setBody(
'<html>' .
' <head></head>' .
' <body>' .
' <div style="background-image:url(\'' . $cid . '\');background-repeat:no-repeat;width:200px;height:150px;border:1px solid black;">test?</div>' .
' <img src="' . $cid . '" alt="Image" />' .
' </body>' .
'</html>',
'text/html' //Mark the content-type as HTML
);any idea how to make the img as background?
thanks