PHP Code:
print('<div id="thumbnail" style="background: url("images/portfolio/'.$row['thumbnail'].'"); width: 240px; height: 160px;">title</div>');
Use that (just cleaner), and could you post what the result is?
I have a feeling you may be forgetting the file extension