1

I'm using CSS to call a background image that populates several thumbnails (works great!) but I ave been told I need to use PHP now and one more thing I have to comply with a strict no img tag policy (only spans).

This is the workable site: www.xxlbreakcomp.com

I tired calling the image using this line of php:

    <span style="background: url('<?php bloginfo('template_directory'); ?> /library/images/thumb.pic.jpg"></span> 

I see it in the inspector but there is a line through it (even when I delete the css reference) so I am lost. If it helps the reason we are switching to PHP is because we will eventually use a loop.

1 Answer 1

1

You are using both single and double quotes and missing the closing parentheses.

url('<?php bloginfo('template_directory'); ?>/library/images/thumb_pic.png')
Sign up to request clarification or add additional context in comments.

1 Comment

Too easy and Works perfectly. The coding gods were on my side today.Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.