•
•
•
•
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 374,174 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,464 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: 468 | Replies: 6 | Solved
![]() |
•
•
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation:
Rep Power: 1
Solved Threads: 1
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
and the include file
ofcourse the username/password are changed here :p
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)
<?php @(include('config.php')) OR die ('<b>config.php not found!</b>'); $links = '<b>News</b>'; $news = get_news(); krsort($news); htmlhead($links); if (!empty($news)) { print ' <TABLE WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD colspan=7><br></TD> </TR> '; foreach ($news as $text ) { ?> <TR> <TD WIDTH=40></TD> <TD WIDTH=670 valign=top> <br> <?=$text ?> <br> </TD> <TD WIDTH=40></TD> </TR> <TR> <TD></TD> <TD> <br><hr> </TD> <TD></TD> </TR> <?php } print '</table>'; } else print ''; htmlfooter(); ?>
and the include file
php Syntax (Toggle Plain Text)
<?php $web = 'http://www.webfire.biz'; define('USERNAME', 'username'); define('PASSWORD', 'password'); define('PAGE_TITLE', 'Pektop'); define('DATA_FILE', 'content.dat'); define('NO_NEWS', 'There is currently no news'); define('WELCOME', '<b>Newswriter Administration</b>'); if (!is_writable(DATA_FILE)) die ('<b>'.DATA_FILE.' is not writable or does not exist!</b>'); function htmlhead($links='') { ?> <?php if ( $links == 'on') { ?> <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=new" class="subnavi">Create News</a> | <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=show" class="subnavi">Show News</a> | <a href="#" onClick="help();" class="subnavi">Help</a> | <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=logout" class="subnavi">Logout</a> <?php } else { print '<span class="subnavi">'.$links.'</span>'; } ?> <?php } function htmlfooter($links='') { ?> <?php } function loginscreen() { ?> <TABLE height=200 WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#FFFFFF> <TR> <TD height=35></TD> </TR> <TR> <TD WIDTH=370> <form action="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>" method="POST"> <input type="hidden" name="action" value="login"> </TD> <TD valign="middle" WIDTH=50> <b>Name:</b> </TD> <TD valign="middle" WIDTH=350> <input style="width:120px" type="text" size="20" maxlength="15" name="name"> </TD> </TR> <TR> <TD WIDTH=370></TD> <TD valign="middle" WIDTH=50> <b>Pass:</b> </TD> <TD valign="middle" WIDTH=550> <input style="width:120px" type="password" size="20" maxlength="15" name="pass"> </TD> </TR> <TR> <TD></TD> <TD></TD> <TD valign="middle" WIDTH=550> <input style="width:120px" type="submit" value="Login"> </form> </TD> </TR> </TABLE> <?php } function get_news() { $serialized = file_get_contents(DATA_FILE); return (empty($serialized))? FALSE : unserialize($serialized); } function save_news() { global $news; ksort ($news); $data = serialize(array_values($news)); $fp = fopen(DATA_FILE,"w+"); fputs($fp,$data); fclose($fp); header("Location: ".$_SERVER['PHP_SELF']."?action=show"); } ?>
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
•
•
Join Date: Feb 2005
Posts: 427
Reputation:
Rep Power: 4
Solved Threads: 12
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 :)
http://www.choose-easyweb.com - Not my design, nor my idea :)
•
•
Join Date: Feb 2005
Posts: 427
Reputation:
Rep Power: 4
Solved Threads: 12
Well, for a "quick fix"...
right after you middle div...
add a non breaking space...
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.
right after you middle div...
add a non breaking space...
<div id="middle">
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 :)
http://www.choose-easyweb.com - Not my design, nor my idea :)
•
•
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation:
Rep Power: 1
Solved Threads: 1
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.
Check out my sig pic.
•
•
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation:
Rep Power: 1
Solved Threads: 1
"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.
Check out my sig pic.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
Other Threads in the HTML and CSS Forum
- Previous Thread: IE problem, can't get 2 divs to show side by side
- Next Thread: Form submit with weird select box result


Linear Mode