TECH trying to make a wordpress theme

BoostedBoogie

New Member
Oct 31, 2003
2,955
[email protected] d13g0
i'll have various divs in there all with individual <img src> tags, but they don't work for some reason. but if i make the div background image the same source through the css, it works. i have no idea why this is going on, any help?
 

pkr

check your referring image location

make sure if it's in the css stylesheet you call it with a "/" so /images/blah.gif

if it's inline on the html it should just be "images/blah.gif"
 

kingtoad

Well-Known Member
Sep 2, 2003
55,788
Los Angeles
The problem is that you are not specifying the correct path to your images folder. It works with CSS because the CSS file is in your theme folder. Keep in mind that your WordPress theme is not in the root directory of your server. You need to specify your template path then call the image accordingly.

Code:
<img src="<?php bloginfo('template_directory'); ?>/images/image.jpg" alt="image" />
 

Users who are viewing this thread

About Us

  • Please do not post anything that violates any Local, State, Federal or International Laws. Your privacy is protected. You have the right to be forgotten. Site funded by advertising, link monetization and member support.
OT v15.8.1 Copyright © 2000-2022 Offtopic.com
Served by fu.offtopic.com

Online statistics

Members online
368
Guests online
52
Total visitors
420

Forum statistics

Threads
369,565
Messages
16,895,794
Members
86,875
Latest member
Theodor