User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 391,944 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,901 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 514 | Replies: 6 | Solved
Reply
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation: Aeneassan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
Aeneassan's Avatar
Aeneassan Aeneassan is offline Offline
Newbie Poster

Very annoying gap...

  #1  
Apr 10th, 2008
Ok this is not to advertise my site at all (it's quite empty right now as i'm still working on the layout.

If you go to http://www.pektop.be you'll see a black gap between my top section and my middle section, I've literally been searching for hours why it does this but i can't seem to find it please help.

(you can right-click source code for it)

There is some php in it


  1. <?php
  2.  
  3.  
  4. @(include('config.php')) OR die ('<b>config.php not found!</b>');
  5.  
  6. $links = '<b>News</b>';
  7. $news = get_news();
  8. krsort($news);
  9.  
  10. htmlhead($links);
  11.  
  12. if (!empty($news))
  13. {
  14. print ' <TABLE WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0>
  15. <TR>
  16. <TD colspan=7><br></TD>
  17. </TR>
  18. ';
  19.  
  20. foreach ($news as $text )
  21. {
  22. ?>
  23.  
  24. <TR>
  25. <TD WIDTH=40></TD>
  26. <TD WIDTH=670 valign=top>
  27. <br>
  28. <?=$text ?>
  29. <br>
  30. </TD>
  31. <TD WIDTH=40></TD>
  32. </TR>
  33.  
  34. <TR>
  35. <TD></TD>
  36. <TD>
  37. <br><hr>
  38. </TD>
  39. <TD></TD>
  40. </TR>
  41. <?php
  42. }
  43. print '</table>';
  44. }
  45. else print '';
  46.  
  47. htmlfooter();
  48. ?>


and the include file


  1. <?php
  2.  
  3. $web = 'http://www.webfire.biz';
  4.  
  5.  
  6. define('USERNAME', 'username');
  7. define('PASSWORD', 'password');
  8. define('PAGE_TITLE', 'Pektop');
  9. define('DATA_FILE', 'content.dat');
  10. define('NO_NEWS', 'There is currently no news');
  11. define('WELCOME', '<b>Newswriter Administration</b>');
  12.  
  13.  
  14.  
  15. if (!is_writable(DATA_FILE)) die ('<b>'.DATA_FILE.' is not writable or does not exist!</b>');
  16.  
  17. function htmlhead($links='')
  18. {
  19. ?>
  20.  
  21. <?php
  22. if ( $links == 'on')
  23. {
  24. ?>
  25. <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=new" class="subnavi">Create News</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
  26. <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=show" class="subnavi">Show News</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
  27. <a href="#" onClick="help();" class="subnavi">Help</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
  28. <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=logout" class="subnavi">Logout</a>
  29. <?php
  30. }
  31. else { print '<span class="subnavi">'.$links.'</span>'; }
  32. ?>
  33.  
  34. <?php
  35. }
  36.  
  37. function htmlfooter($links='')
  38. {
  39. ?>
  40.  
  41. <?php
  42. }
  43.  
  44. function loginscreen()
  45. {
  46. ?>
  47. <TABLE height=200 WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#FFFFFF>
  48. <TR>
  49. <TD height=35></TD>
  50. </TR>
  51. <TR>
  52. <TD WIDTH=370>
  53. <form action="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>" method="POST">
  54. <input type="hidden" name="action" value="login">
  55. </TD>
  56. <TD valign="middle" WIDTH=50>
  57.  
  58. <b>Name:</b>
  59. </TD>
  60. <TD valign="middle" WIDTH=350>
  61.  
  62. <input style="width:120px" type="text" size="20" maxlength="15" name="name">
  63. </TD>
  64. </TR>
  65. <TR>
  66. <TD WIDTH=370></TD>
  67.  
  68. <TD valign="middle" WIDTH=50>
  69.  
  70. <b>Pass:</b>
  71. </TD>
  72. <TD valign="middle" WIDTH=550>
  73.  
  74. <input style="width:120px" type="password" size="20" maxlength="15" name="pass">
  75. </TD>
  76. </TR>
  77. <TR>
  78. <TD></TD>
  79. <TD></TD>
  80. <TD valign="middle" WIDTH=550>
  81.  
  82. <input style="width:120px" type="submit" value="Login">
  83. </form>
  84. </TD>
  85. </TR>
  86. </TABLE>
  87. <?php
  88. }
  89.  
  90. function get_news()
  91. {
  92. $serialized = file_get_contents(DATA_FILE);
  93. return (empty($serialized))? FALSE : unserialize($serialized);
  94. }
  95.  
  96. function save_news()
  97. {
  98. global $news;
  99. ksort ($news);
  100.  
  101. $data = serialize(array_values($news));
  102. $fp = fopen(DATA_FILE,"w+");
  103. fputs($fp,$data);
  104. fclose($fp);
  105.  
  106. header("Location: ".$_SERVER['PHP_SELF']."?action=show");
  107. }
  108.  
  109. ?>


ofcourse the username/password are changed here :p
Last edited by peter_budo : Apr 10th, 2008 at 4:10 pm. Reason: [icode] is for one line of code, [code] is for multiple lines
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2005
Posts: 427
Reputation: autocrat is on a distinguished road 
Rep Power: 4
Solved Threads: 12
autocrat autocrat is offline Offline
Posting Pro in Training

Re: Very annoying gap...

  #2  
Apr 10th, 2008
Any chance of you being a little more specific as to which sections (putting Here1 and Here2 would have been very helpful).
Sometimes life holds wonderful suprises - shame I sleep through them all.
http://www.choose-easyweb.com - Not my design, nor my idea :)
Reply With Quote  
Join Date: Feb 2005
Posts: 427
Reputation: autocrat is on a distinguished road 
Rep Power: 4
Solved Threads: 12
autocrat autocrat is offline Offline
Posting Pro in Training

Re: Very annoying gap...

  #3  
Apr 10th, 2008
Well, for a "quick fix"...
right after you middle div...
add a non breaking space...

<div id="middle">&nbsp;

Of course, it would help if you had a Doc Type, had a 0 (zero) for padding rather than an O (Capital letter o) etc. etc.

Pelase...
http://validator.w3.org
Use it to check as you build, saves lots of annoying little confusions.
Sometimes life holds wonderful suprises - shame I sleep through them all.
http://www.choose-easyweb.com - Not my design, nor my idea :)
Reply With Quote  
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation: Aeneassan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
Aeneassan's Avatar
Aeneassan Aeneassan is offline Offline
Newbie Poster

Re: Very annoying gap...

  #4  
Apr 10th, 2008
thank you very much for your assistance, the issue is solved. Also, I didn't know validator worked on php pages, thanks.
Reply With Quote  
Join Date: May 2006
Location: Illinois
Posts: 591
Reputation: kylethedarkn is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 36
Colleague
kylethedarkn's Avatar
kylethedarkn kylethedarkn is offline Offline
A.K.A. The Laughing Man

Re: Very annoying gap...

  #5  
Apr 14th, 2008
The Nav Bar at the top seems a little messed up in Firefox. When you hover over one of the links all of the links to the left of it change to underneath it and blink. Very annoying, unless of course its for the feel of the website.
"I thought what I'd do was, I'd pretend I was one of those Deaf-Mutes"..."Or should I?"--The Laughing Man
Check out my sig pic.
Reply With Quote  
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation: Aeneassan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
Aeneassan's Avatar
Aeneassan Aeneassan is offline Offline
Newbie Poster

Re: Very annoying gap...

  #6  
Apr 15th, 2008
yeah I'm still working on that, it's not supposed to happen :p
Reply With Quote  
Join Date: May 2006
Location: Illinois
Posts: 591
Reputation: kylethedarkn is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 36
Colleague
kylethedarkn's Avatar
kylethedarkn kylethedarkn is offline Offline
A.K.A. The Laughing Man

Re: Very annoying gap...

  #7  
Apr 15th, 2008
Originally Posted by Aeneassan View Post
yeah I'm still working on that, it's not supposed to happen :p

Hehe. Ok then just thought I should mention it.
"I thought what I'd do was, I'd pretend I was one of those Deaf-Mutes"..."Or should I?"--The Laughing Man
Check out my sig pic.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 8:45 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC