I tried with this also "background:url('{{ STATIC_URL }}images/human.png'); " image background is not applied in print-out and email also.
On Thu, Jun 13, 2013 at 3:06 PM, Thomas Weholt <thomas.weh...@gmail.com>wrote: > My first suggestion would be to see what {{ STATIC_URL }} renders as in > your browser. Another thing; if you want to use this template to generate > emails, IP-addresses starting with 192.168.x.x would not work because they > are reserved for internal networks AFAIK. The image would have to be > available for users outside your network for it to be displayed correctly > in an email. > > PS! - This problem is not django specific and should be posted to a group > more aimed at webdevelopment in genereal. > > Thomas > > > > On Thu, Jun 13, 2013 at 11:19 AM, <roopasingh...@gmail.com> wrote: > >> html: >> >> <table id="human-body" class="printout" > >> <tr> >> <td width="25%"></td> >> <td width="25%">{%if injuary_mark.mark1 %}<img style="float: >> right; margin:5px 4px -35px 0;" src="{{ STATIC_URL }}images/red-cross.png"> >> {% endif %} >> </td> >> <td width="25%">{%if injuary_mark.mark2 %}<img style="float: >> right;margin:5px 8px -35px -8px;" src="{{ STATIC_URL >> }}images/red-cross.png"> {% endif %} >> </td> >> <td width="25%"></td> >> </tr> >> </table> >> >> css: >> >> .printout{ >> background:url('http://192.168.100.10/static/images/human.png'); >> width:123px; >> height:298px; >> background-position:center; >> background-color: transparent; >> background-repeat: no-repeat; >> vertical-align:middle; >> border: none; >> } >> >> The above html and css is for print-out template.Problem is if i press >> print button,print preview is coming but without background image.I am >> sending the same template as email,facing same problem while sending email >> also.The image is not displayed in email copy also. >> >> I tried giving the direct url of image also,still the problem not solved. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/django-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Mvh/Best regards, > Thomas Weholt > http://www.weholt.org > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.