So I made myself a little html/css template. And now I'm trying to actually use it with some PHP code however, it only renders text. The images and css arent there. Everything is in the templates/Default directory. Do i have to do something funky with my paths in the template?
所以我给自己做了一个小的html / css模板。现在我试图将它与一些PHP代码一起使用,但它只渲染文本。图像和CSS不在那里。一切都在模板/默认目录中。我是否必须在模板中使用我的路径做一些时髦的事情?
4 个解决方案
#1
Use firebug and see why the images don't show up. You need to activate the "NET" tab and then you see all the requests being made when your browser requests the page. My guess is that the paths to CSS and images are incorrect.
使用萤火虫,看看为什么图像不显示。您需要激活“NET”选项卡,然后才能看到浏览器请求页面时发出的所有请求。我的猜测是CSS和图像的路径不正确。
#2
Wow, that's a weird question... :)
哇,这是一个奇怪的问题...... :)
Just check what URLs the browser requests when looking for the stylesheets/images. I think you will have to adjust paths that you use in your smarty template.
只需检查浏览器在查找样式表/图像时请求的URL。我认为你必须调整你在smarty模板中使用的路径。
#3
Yes probably, sorry it is always a pain with linking images and css - seems simple, but isn't always!!!
是的,对不起,链接图像和CSS总是很痛苦 - 看起来很简单,但并不总是!
Is there a space being create for where the images should be? If so, right click and see the path the image is calling in and make sure it is uploaded there.
是否有创建图像所在位置的空间?如果是这样,请右键单击并查看图像调用的路径,并确保将其上载到那里。
Otherwise, use a tool like firebug (firefox plugin) to find out where the css and images are being called in, or just right click and 'view source of the page' then just make sure everything is being called in from the right place! If needs be, put direct urls for the images ie. www.mysite.com/templates/templatename/images/myimage.gif - just to make sure they are where you think they are!
否则,使用像firebug(firefox插件)这样的工具来找出调用css和图像的位置,或者只需右键单击并“查看页面的源代码”,然后确保从正确的位置调用所有内容!如果需要,请为图像添加直接网址即。 www.mysite.com/templates/templatename/images/myimage.gif - 只是为了确保它们在您认为的位置!
good luck
#4
you shoudl put your images in html/img
你shoudl把你的图像放在html / img
Then all image paths should start /img/
然后所有图像路径应该开始/ img /
#1
Use firebug and see why the images don't show up. You need to activate the "NET" tab and then you see all the requests being made when your browser requests the page. My guess is that the paths to CSS and images are incorrect.
使用萤火虫,看看为什么图像不显示。您需要激活“NET”选项卡,然后才能看到浏览器请求页面时发出的所有请求。我的猜测是CSS和图像的路径不正确。
#2
Wow, that's a weird question... :)
哇,这是一个奇怪的问题...... :)
Just check what URLs the browser requests when looking for the stylesheets/images. I think you will have to adjust paths that you use in your smarty template.
只需检查浏览器在查找样式表/图像时请求的URL。我认为你必须调整你在smarty模板中使用的路径。
#3
Yes probably, sorry it is always a pain with linking images and css - seems simple, but isn't always!!!
是的,对不起,链接图像和CSS总是很痛苦 - 看起来很简单,但并不总是!
Is there a space being create for where the images should be? If so, right click and see the path the image is calling in and make sure it is uploaded there.
是否有创建图像所在位置的空间?如果是这样,请右键单击并查看图像调用的路径,并确保将其上载到那里。
Otherwise, use a tool like firebug (firefox plugin) to find out where the css and images are being called in, or just right click and 'view source of the page' then just make sure everything is being called in from the right place! If needs be, put direct urls for the images ie. www.mysite.com/templates/templatename/images/myimage.gif - just to make sure they are where you think they are!
否则,使用像firebug(firefox插件)这样的工具来找出调用css和图像的位置,或者只需右键单击并“查看页面的源代码”,然后确保从正确的位置调用所有内容!如果需要,请为图像添加直接网址即。 www.mysite.com/templates/templatename/images/myimage.gif - 只是为了确保它们在您认为的位置!
good luck
#4
you shoudl put your images in html/img
你shoudl把你的图像放在html / img
Then all image paths should start /img/
然后所有图像路径应该开始/ img /