gpt4 book ai didi

css - 上传到服务器时不显示div

转载 作者:太空宇宙 更新时间:2023-11-03 19:33:42 25 4
gpt4 key购买 nike

当我上传到服务器时,2 Div 没有显示,但它们在我的本地主机 (wampp) 上显示正常。任何人都可以就为什么会这样提供帮助吗?有问题的 divs 是'页脚'和'海报'

html

<div class="wrapper">
<?php include '../inc/header.php';?>
<div id="info">
<div id="what">
<span class="h1">WHAT IS IT?</span>
</div>
<?php
include '../inc/connect.php';
$data = mysql_query("SELECT info FROM mainhomepagecontent")
or die(mysql_error());
while($info = mysql_fetch_array( $data )) {
echo "<span class='text'>";
echo nl2br($info['info']);
echo "</span>";
}
?>
</div>
<?php include '../inc/poster.php';?>
<?php include '../inc/footer.php';?>
</div>

页脚文件

<?php
$output = "<div class='footer'>";
$output .= "<div class='wsd'>";
$output .= "Site Developed by Webslinger Development";
$output .= "</div>";
$output .= "<div class='ngcopyright'>";
$output .= "All Rights Reserved 2013 &copy Needle Gangsta's ";
$output .= "</div>";
$output .= "</div>";
echo $output;
?>

海报文件

<?php
$output ='<div class="poster">';
$output .='<div class="posterfixed">';
$output .='<div class="eighteenlogo">';
$output .= '<img src="../images/siteimages/18logo.png" />';
$output .= '</div>';
$output .='<div id="wherewhen">';
$output .='<div id="when">';
$output .='<span class="h2">WHEN IS IT?</span><br /> <span class="text2">9TH/10TH
FEBUARY 2014</span>';
$output .='</div>';
$output .='<div id="where">';
$output .='<span class="h2">WHERE IS IT?</span><br /> <span class="text2">Holiday Inn
(EAST)<br />
London Rd<br />
Newport Pagnell<br />
Milton Keynes<br /> MK16 0JA</span>';
$output .='</div>';
$output .='</div>';
$output .='</div>';
echo $output;
?>

和CSS

.header{
float:left;
margin:15px 0 0 0;
width:280px;
min-height:382px;
}

.headerfixed{
position:fixed;
width:280px;
min-height:382px;
background-image:url(../images/siteimages/logo.png);
background-repeat:no-repeat;
}

.wrapper{
width:1280px;
position:relative;
border-left:1px solid #ffffff;
border-right:1px solid #ffffff;
margin: 0 auto 0 auto;
background:#000000;
overflow:hidden;
}

/*sets the left side div*/
.poster{
position:absolute;
top:20px;
right:0;
width:390px;
min-height:512px;
}

.posterfixed{
position:fixed;
width:390px;
min-height:512px;
background-image:url(../images/siteimages/background.png);
}

.eighteenlogo{
position:absolute;
right:10px;
top:450px;
}



/*sets the footer*/
.footer{
float:left;
min-width:1280px;
overflow:hidden;
}

感谢您的关注......................

最佳答案

您可以使用 Heardoc ( wikipedia ) 而不是连接字符串。我认为缩进更容易看到,它可以帮助您发现未闭合的标签:

$output = <<<EOF
<div class="footer">
<div class="wsd">
Site Developed by Webslinger Development
</div>
<div class="ngcopyright">
All Rights Reserved 2013 &copy; Needle Gangsta's
</div>
</div>
EOF;

echo $output;

EOF 标识符中的任何内容(这可以是您想要的任何内容,请参阅引用资料。)不会忽略任何空格。

关于css - 上传到服务器时不显示div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17223907/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com