View Full Version : Extra Space On Page
CoolAsCarlito
06-16-2008, 10:08 PM
Can someone go to this page for me and tell me why there comes up as an extra space between each of the contenders and how to fix it because I dont' have an /n or </br> tag in the coding at all.
http://www.kansasoutlawwrestling.com/champions.php
Fou-Lu
06-16-2008, 10:12 PM
Header tags are block levels that tend to have padding and/or spacing. They are designed for emphasis on specific blocks of text, and thats why you are getting your spaces. Tested on FF3.
Use CSS to remove the margins from the blocks, that will clear it out. I don't think you really want to do that though, I'd recommend switching the <h#> calls for anything thats not really a header to a standard <div>
CoolAsCarlito
06-16-2008, 10:19 PM
You are a stud bro. lol Anyway yes that was it but here's an actual hard question with my php table in my page how do I say include an image in there since I have like 5 seperate title belt images.
Fou-Lu
06-16-2008, 10:23 PM
Design your html to include them. Something like:
<div class="wrestlerDisplay">
<p><a href="linktothem">Wrestlers Name</a></p>
<img src="theirimage.jpg" alt="So and so's image" />
</div>
Then use CSS to create the display you want. These really are more html questions, and I'm not really a front end designer.
CoolAsCarlito
06-16-2008, 10:28 PM
I'm confused however on where I should enter that into my php because I know for something like that has to go in a certain place.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>KOW Champions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="black" text="white">
<script language=JavaScript>
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="All property of KOW is trademarked and copyrighted. ";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>
<?php
// Connects to your Database
$link = mysql_connect("?", "?", "?") or die(mysql_error());
mysql_select_db("?",$link) or die(mysql_error());
if (!mysql_select_db("?", $link)) {
echo 'Could not select database';
exit;
}
//Define the query
$query = 'SELECT * FROM titles';
if ($r = mysql_query ($query)){ // Run the query.
// Retrieve and print every record
while ($row = mysql_fetch_array ($r)){
print '<center><h2><font color="white"><a href="title.php?id=' . $row['id'] . '">'.$row['titlename'].'</a></font></h2></center>';
print '<center><h4><font color="white"><a href="bios.php?id=' . $row['id'] . '">'.$row['champion'].'</a></font></h4></center>';
print '<center><font color="white"><u>Contenders</u></font></center>';
print '<center><font color="white"><a href="bios.php?id=' . $row['id'] . '">'.$row['contender1'].'</a></font></center>';
print '<center><font color="white"><a href="bios.php?id=' . $row['id'] . '">'.$row['contender2'].'</a></font></center>';
print '<center><font color="white"><a href="bios.php?id=' . $row['id'] . '">'.$row['contender3'].'</a></font></center>';
}
} else {
die ('<p>Could not retrieve the data because <b>' . mysql_error() . '</b>. The query was $query.</p>');
} //End of query IF
?>
</body>
</html>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.