Jump to content


Help With Background Color


2 replies to this topic

#1 Hayezb

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 14 July 2008 - 02:07 PM

I am having an issue with the background color on my site. I'm using the <div> tags and there is a small, like 10px, gap above the footer that is the same color as the main background. It's only on certain pages though, here is an example:

<div id="main">
  <?
  function showForm($error=""){
	  ?>
	  
  
		  <img src="images/login.gif">
	  <div id="main"><img src="images/squares.gif" />&nbsp;Please enter your password to view and download the forms provided by us.</div>
  
	  <?
  ?>
  <body>
	<?php echo $error; ?>
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="pwd">
	   <table>
		 <tr>
		   <td><input name="passwd" type="password"/></td>
			  &nbsp;&nbsp;
		   <td align="center"><input type="submit" name="submit_pwd" value="Login"/>
		   </td>
		 </tr>
	   </table>  
		  </form>
  </body>	   
  <?php   
  }
  ?> 
  <?
  $Password = 'demo'; // Set your password here
  
  if (isset($_POST['submit_pwd'])){
	 $pass = isset($_POST['passwd']) ? $_POST['passwd'] : '';
	   
	 if ($pass != $Password) {
	 ?>		
		<div id="title"><b>Wrong Password!</b></div>
	  <?
		showForm("");
		include "footer.php";
		exit();	 
	 }
  } else {
	 showForm();
	 include "footer.php"; 
	 exit();
  }
  ?>
  </div>

I have my forms.php file that requires the protector.php (the one showed above). Any suggestions would be appreciated.

Edited by Hayezb, 14 July 2008 - 02:08 PM.


#2 derek.sullivan

    Jedi In Training

  • Members
  • PipPip
  • 343 posts
  • Gender:Male
  • Location:Georgia
  • Interests:preaching, programming, music, friends, outdoors, moves, books

Posted 22 July 2008 - 11:29 AM

View PostHayezb, on Jul 14 2008, 03:07 PM, said:

I am having an issue with the background color on my site. I'm using the <div> tags and there is a small, like 10px, gap above the footer that is the same color as the main background. It's only on certain pages though, here is an example:

<div id="main">
  <?
  function showForm($error=""){
	  ?>
	  
  
		  <img src="images/login.gif">
	  <div id="main"><img src="images/squares.gif" />&nbsp;Please enter your password to view and download the forms provided by us.</div>
  
	  <?
  ?>
  <body>
	<?php echo $error; ?>
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="pwd">
	   <table>
		 <tr>
		   <td><input name="passwd" type="password"/></td>
			  &nbsp;&nbsp;
		   <td align="center"><input type="submit" name="submit_pwd" value="Login"/>
		   </td>
		 </tr>
	   </table>  
		  </form>
  </body>	   
  <?php   
  }
  ?> 
  <?
  $Password = 'demo'; // Set your password here
  
  if (isset($_POST['submit_pwd'])){
	 $pass = isset($_POST['passwd']) ? $_POST['passwd'] : '';
	   
	 if ($pass != $Password) {
	 ?>		
		<div id="title"><b>Wrong Password!</b></div>
	  <?
		showForm("");
		include "footer.php";
		exit();	 
	 }
  } else {
	 showForm();
	 include "footer.php"; 
	 exit();
  }
  ?>
  </div>

I have my forms.php file that requires the protector.php (the one showed above). Any suggestions would be appreciated.


can we have a link to the problem?

#3 Ghost

    Honored P2L Member

  • P2L Staff
  • PipPipPip
  • 675 posts
  • Gender:Male
  • Location:Australia

Posted 22 July 2008 - 10:14 PM

Have you removed margin/padding on body in your css?

body{
margin: 0;
padding: 0;
}






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users