• Resolved pavlos1982

    (@pavlos1982)


    im trying to convert this code <div id=”image”><img id=”background” src=”backg/catering.jpg” alt=”” title=”” /></div> turn it into php and before anybody says css i know i can use css achieve this quick but the effect im trying to achieve on the website wont work im using a technique to use background image

    so if anybody knows how can i turn “<div id=”image”><img id=”background” src=”backg/catering.jpg” alt=”” title=”” /></div> “

    to php include or wordpress compliant php that be great thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have no idea what you mean by make it into php? a better description maybe?

    <div id="image">
    <img src="<?php bloginfo('template_url'); ?>/backg/catering.jpg" id="background" alt="" title ="" />
    </div>
    Thread Starter pavlos1982

    (@pavlos1982)

    that is exactly what i was looking for thank you very much, sorry about the explaination but this is what i was looking for the problem i was facing is with this code : “<div id=”image”><img id=”background” src=”backg/catering.jpg” alt=”” title=”” />”

    i cant test the website offline , or when i have activate the theme in wordpress “backg/catering.jpg” just does nt work because im not using css to get the background or using a full url

    so <div id=”image”>
    <img src=”<?php bloginfo(‘template_url’); ?>/backg/catering.jpg” id=”background” alt=”” title =”” />
    </div> definitely works , online and offline

    again thank you

    sure! glad we could figure it out!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘loading an image in a div using php’ is closed to new replies.