PDA

View Full Version : Unneccasary space.



Barchie
30 Nov 2005, 06:55 AM
Despite much annoyance, on my website a blank space that looks to be created by a <br> / <p> appears after my login box. Can anyone see any reason with my code (this is included into another page) why there would be a space created under the my login form ?

<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
a.whitelink {
color: #ffffff;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
}
whitetext {
color: #ffffff;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
}
textarea {
font-size: 11px;
background-color: #000000;
border: 1px solid #666666;
color: #FFFFFF;
padding: 0px;
margin: 0px;
}
input {
font-size: 11px;
background-color: #000000;
border: 1px solid #666666;
height: 17px;
color: #FFFFFF;
padding: 0px;
margin: 0px;
}


-->
</style>
<?php

function login_menu() {
global $pun_user;
if ($pun_user['is_guest']) {
echo "<form id=\"login\" method=\"post\" action=\"/forum/login.php?action=in\" onsubmit=\"return process_form(this)\">
<input type=\"hidden\" name=\"form_sent\" value=\"1\" />
<input type=\"hidden\" name=\"redirect_url\" value=\"".$_SERVER['SCRIPT_NAME']."\" />
<input type=\"text\" name=\"req_username\" size=\"16\" maxlength=\"16\" value=\"Username\"
onFocus=\"\" />
<input type=\"password\" name=\"req_password\" size=\"16\" maxlength=\"16\" value=\"Password\" onFocus=\"\" />
<input type=\"submit\" name=\"login\" value=\"Login\" />
</form>"; }
else
echo
"Logged in as: ".pun_htmlspecialchars($pun_user['username'])." | Last visit: ". format_time($pun_user['last_visit'])."
Click <a href=\"/forum/login.php?action=out&id=".$pun_user['id']."&location_out=".$_SERVER['SCRIPT_NAME']."\" class=\"whitelink\">here</a> to log out.</a>";
}
?>

DreamSync
30 Nov 2005, 12:52 PM
Try adding form { margin-bottom: 0 ; } to your css information. You can always make that effect specific to the one form if you dont want it to effect all of the forms on your site. If that doesnt work, can you post the url here?