Background image – does not display
-
Hi,
I am using this:
<div class=”smallblock-cont” style=”background-image: url(<?php echo get_template_directory_uri(); ?>/images/image.jpg)”>
to display background image on my localhost site.
But image does not display.Full path to images is:
https://localhost/sitename/wp-content/themes/themename/images/image.jpg
I do not want use full path, because I do not want overwrite all image paths when moving to webhosting.
Relative paths “/images/image.jpg” dont work.Can anybody help me?
Thanks
Alex
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Background image – does not display’ is closed to new replies.