I recently converted http://usborrow.pizzli.com/apply to a WordPress Page Template for a site. Every other page came out fine, but when I go to http://usborrow.pizzli.com/?page_id=6, the page seems to lose all of its styling. Any support would be appreciated.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Apparently there's an issue with the relative URL reference. Rather than referencing to the stylesheet with
<link href="../css/style.css" rel="stylesheet" type="text/css" />
Try absolute path instead
<link href="/css/style.css" rel="stylesheet" type="text/css" />
This should work on all pages, assuming that you store the stylesheet file inside the css folder within the site root folder. You should also do the same thing with the other CSS for IE
<!--[if lt IE 8]><link rel="stylesheet" type="text/css" href="/css/ie7below.css" /><![endif]-->
This way, no matter how deep the path the user is accessing (e.g http://usborrow.pizzli.com/folder1/folder2/folder3/file.abc) the CSS can be referenced without any problem.
回答2:
It would seem you should include /apply/style.css.