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

标签 css css-position

当我上传到服务器时,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/

相关文章:

flash - 为什么 IE 中的 Z-Index 不按照 Flash 电影应有的方式呈现?

css - 对齐页面底部的两个按钮

css - 使用 CSS 制作表格

css - 如何为没有背景颜色的表格行着色?

html - 某些元素不受使用伪类后的 z-index 的影响

html - 位置:示例中的粘性元素不粘性

html - 水平对齐搜索栏和按钮

html - 在 Internet Explorer 11 中,页脚显示在屏幕中间而不是底部

javascript - 在最后一张幻灯片上停止 jQuery 按钮事件

css - 为什么我的位置是: absolute div placed differently in Edge?