我的内容目前没有回应.我在iPhone上测试了它,文字在屏幕上显示.
我已将容器的CSS更改为:
#container2 {
width: 960px;
max-width: 90%;
position: relative;
left: 50%;
margin-left: -480px;
line-height: 1.4em;
}
Run Code Online (Sandbox Code Playgroud)
当我在更改后测试它时,内容消失.我读到最大宽度:90%; 允许它不超过边界宽度(http://webdesignerwall.com/tutorials/5-useful-css-tricks-for-responsive-design)但显然它不起作用.我究竟做错了什么?
我正在尝试回显我的'_images'文件夹中的图像,但是如果我编写以下代码,它只适用于我的网站:
echo '<img src="http://mywebsite.com/mytheme/wp-content/themes/my theme/_images/project3image1.jpg">';
Run Code Online (Sandbox Code Playgroud)
我把它改成了这个,所以当别人使用我的主题时,它会将它们带到他们自己的网站目录:
echo '<img src="<?php bloginfo('stylesheet_directory'); ?>/_images/project3image1.jpg">';
Run Code Online (Sandbox Code Playgroud)
但是当我把它和预览我的网站时,这个代码肯定有问题,它给了我这个错误:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/32/9825632/html/bomb/wp-content/themes/bomb/header.php on line 101
Run Code Online (Sandbox Code Playgroud)
我是一个PHP菜鸟,所以这可能是一个明显的错误!