943,949 Members | Top Members by Rank

Ad:
Apr 10th, 2008
0

Very annoying gap...

Expand Post »
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


php Syntax (Toggle Plain Text)
  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


php Syntax (Toggle Plain Text)
  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 5:10 pm. Reason: [icode] is for one line of code, [code] is for multiple lines
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Aeneassan is offline Offline
15 posts
since Mar 2008
Apr 10th, 2008
0

Re: Very annoying gap...

Any chance of you being a little more specific as to which sections (putting Here1 and Here2 would have been very helpful).
Reputation Points: 63
Solved Threads: 12
Posting Pro in Training
autocrat is offline Offline
427 posts
since Feb 2005
Apr 10th, 2008
1

Re: Very annoying gap...

Well, for a "quick fix"...
right after you middle div...
add a non breaking space...

HTML and CSS Syntax (Toggle Plain Text)
  1. <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.
Reputation Points: 63
Solved Threads: 12
Posting Pro in Training
autocrat is offline Offline
427 posts
since Feb 2005
Apr 10th, 2008
0

Re: Very annoying gap...

thank you very much for your assistance, the issue is solved. Also, I didn't know validator worked on php pages, thanks.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Aeneassan is offline Offline
15 posts
since Mar 2008
Apr 14th, 2008
0

Re: Very annoying gap...

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.
Team Colleague
Reputation Points: 55
Solved Threads: 39
A.K.A. The Laughing Man
kylethedarkn is offline Offline
600 posts
since May 2006
Apr 15th, 2008
0

Re: Very annoying gap...

yeah I'm still working on that, it's not supposed to happen :p
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Aeneassan is offline Offline
15 posts
since Mar 2008
Apr 15th, 2008
0

Re: Very annoying gap...

Click to Expand / Collapse  Quote originally posted by Aeneassan ...
yeah I'm still working on that, it's not supposed to happen :p
Hehe. Ok then just thought I should mention it.
Team Colleague
Reputation Points: 55
Solved Threads: 39
A.K.A. The Laughing Man
kylethedarkn is offline Offline
600 posts
since May 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: IE problem, can't get 2 divs to show side by side
Next Thread in HTML and CSS Forum Timeline: Form submit with weird select box result





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC