0

2 Divs are not showing when I upload to a server, but they show ok on my localhost(wampp). Can anyone offer assistance on why this may be? The divs in question are'footer' and 'poster'

html

<body>
   <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>
   </body>

poster.php

<?php
   $poster ='<div class="poster">';
   $poster .='<div class="posterfixed">';
   $poster .='<div class="eighteenlogo">';
   $poster .= '<img src="../images/siteimages/18logo.png" />';
   $poster .= '</div>';
   $poster .='<div id="wherewhen">';
   $poster .='<div id="when">';
   $poster .='<span class="h2">WHEN IS IT?</span><br /> <span class="text2">9TH/10TH FEBUARY 2014</span>';
   $poster .='</div>';
   $poster .='<div id="where">';
   $poster .='<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>';
    $poster .='</div>';
    $poster .='</div>';
    $poster .='</div>';
    $poster .='</div>';

   echo $poster;
?>

footer.php

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


   echo $footer;
?>

css file

html, body{
   margin:0; 
   padding:0;
   width:100%;
   height:100%;
   overflow:auto;
   background:#000000;
}

.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;
}

.wsd{
   float:right;
   font-size:.7em;
   margin-left:1em;
   color:#ffffff;
}


.ngcopyright{
   float:left;
   font-size:.7em;
   margin-left:1em;
   color:#ffffff;
}

#wherewhen{
   width:200px;
   position:absolute;
   left:5px;
   top:430px;
   text-shadow: 1px 1px #fc0808;

}

#expoinfo{
   width:300px;
   line-height:30px;
   position:absolute;
   left:5px;
   top:430px;
   text-shadow: 1px 1px #f3fc08;

}

#where{
   text-align:center;
}

#when{
   text-align:center;
}

#what{
   width:400px;
   text-align:center;
   margin:0 auto 0 auto;
}

#info{
   width:580px;
   background:red;
   min-height:700px;
   margin:20px 20px 0 295px;
   text-shadow: 2px -2px #000000;
   word-wrap:break-word;
}

Can anyone help me out on this? It's really frustrating me now!

Thanks

3
Contributors
6
Replies
35
Views
5 Years
Discussion Span
Last Post by drjohn
0

But every other div has css in the same file, and also the 2 unshown divs show ok locally!

0

I don't have the facility to test this, but given the symptoms I can only see two issues.

  1. It's a file path issue on the live server. You've placed poster.php and footer.php in the wrong folder or the files are corrupt or their names are wrong.

  2. A .htaccess file is doing something funky on the live server. But this would seem unlikely as you say it is reading header.php OK.

The css has little to do with the problem I would have thought... The only thing I could think of is if your css sets the xy position to be way off the page so you can't see it. But if it is EXACTLY the same as your local server I doubt this is the problem. Can only go on what you tell us.

Edited by iamthwee

0

Actually, it could be your db username and password for the live server might be different.
Have you checked this first? Does the query $data = mysql_query("SELECT info FROM mainhomepagecontent") return data?

Edited by iamthwee

0

Is the parent file also called something.php or is it something.htm ? Needs to be the former, not the latter.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.