JavaScript and client side scripting.
Moderator: General Moderators
thefreebielife
Forum Contributor
Posts: 126 Joined: Thu Apr 26, 2007 2:59 pm
Post
by thefreebielife » Wed May 23, 2007 3:24 pm
Code: Select all
<? session_start(); ?>
<? require("config.php"); require("functions.php"); ?>
<html>
<title>The Freebie Life</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" />
<script src="nav.js" type="text/javascript"></script>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (index.psd) -->
<TABLE WIDTH=900 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<TR>
<TD COLSPAN=7>
<IMG SRC="images/index_01.gif" WIDTH=900 HEIGHT=113 ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="images/index_02.gif" WIDTH=177 HEIGHT=47 ALT=""></TD>
<TD>
<A HREF="http://www.cash.thefreebielife.com/works.php">
<IMG SRC="images/index_03.gif" WIDTH=122 HEIGHT=47 BORDER=0 ALT=""></A></TD>
<TD>
<A HREF="aim:goim?screenname= tflsupport">
<IMG SRC="images/index_04.gif" WIDTH=132 HEIGHT=47 BORDER=0 ALT=""></A></TD>
<TD>
<A HREF="http://www.cash.thefreebielife.com/olist.php">
<IMG SRC="images/index_05.gif" WIDTH=81 HEIGHT=47 BORDER=0 ALT=""></A></TD>
<TD>
<A HREF="http://www.cash.thefreebielife.com/proof.php">
<IMG SRC="images/index_06.gif" WIDTH=84 HEIGHT=47 BORDER=0 ALT=""></A></TD>
<TD>
<A HREF="http://www.cash.thefreebielife.com/login.php">
<IMG SRC="images/index_07.gif" WIDTH=138 HEIGHT=47 BORDER=0 ALT=""></A></TD>
<TD>
<IMG SRC="images/index_08.gif" WIDTH=166 HEIGHT=47 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=7>
<IMG SRC="images/index_09.gif" WIDTH=900 HEIGHT=31 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=7>
<IMG SRC="images/index_10.gif" WIDTH=900 HEIGHT=41 ALT=""></TD>
</TR>
</TABLE>
<TABLE WIDTH=900 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<tr>
<td width="100%" valign="top">
<?
$ref = $_GET['r'];
if ($_GET['r'] != "") {
$rid = $_GET['r'];
}
//select the table
$result = mysql_query("select * from gifts order by gId");
$i = 1;
//grab all the content
while($r=mysql_fetch_array($result))
{
$gid=$r["gId"];
$gname=$r["gName"];
$gdescription=$r["gDescription"];
$gimage=$r["gImage"];
$gprice=$r["gPrice"];
?>
<Td>
<Table style="width:200px "><tr><td><div class="top"><div class="gimage" align="center"><img src="<? echo "$gimage";?>" border="0"></div></td></tr>
<tr><td align="center"><div class="gname"><? echo "$gname"; ?></div></td></tr>
<tr><td><div class="gdescription"><? echo stripslashes($gdescription); ?></div></td></tr>
<tr><td><div class="gprice" align="left"><font color="#000000">Price:</font> $<? echo "$gprice"; ?><font color="#000000"> <a href="register.php?gid=<? echo "$gid"; ?>&&r=<? echo "$rid"; ?>">Get It Free</a></font><font color="#FF9900" style="font-weight:bold ">>></font> </div></td></tr>
</Table>
</Td>
<?
if ($i % 3 == 0) { echo "</tr><tr>"; }
$i++;
}
?>
</td>
</tr>
</table>
<TABLE WIDTH=900 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<tr>
<td width="100%" valign="top">Terms/ contact info</td>
</tr>
</table>
<!-- End ImageReady Slices -->
</BODY>
</HTML>
okay so thats my index.php page. here is the css that effects this page. im not sure if thats playing a role or not.
Code: Select all
#gifts {
width: 725px;
padding-left:100px;
}
html>body #gifts {
width: 725px;
padding-left:100px;
}
.gimage {
border: 1px solid;
border-color:#E4E4E4;
height:110px
}
.top {
float: center;
width: 200px;
text-align: center;
padding-left:20px;
padding-top:30px
}
.gdescription {
font-size:13px;
height:45px
}
.odescription {
font-size:13px;
}
.gprice {
font-size:13px;
color:#FF0000;
font-weight:bold
}
.gname {
color: #000000;
font-weight:bold
}
what is happening is a HUGE indent before the first gift.
please help.. it will be appreciated.
califdon
Jack of Zircons
Posts: 4484 Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA
Post
by califdon » Wed May 23, 2007 6:53 pm
You have several errors in your css style sheet.
Code: Select all
.top {
float: center;
width: 200px;
text-align: center;
padding-left:20px;
padding-top:30px
}There is no such property as
center , for float, only Left, Right and None.
You have some cut-and-paste problem here, it looks like:
Code: Select all
html>body #gifts {
width: 725px;
padding-left:100px;
}
thefreebielife
Forum Contributor
Posts: 126 Joined: Thu Apr 26, 2007 2:59 pm
Post
by thefreebielife » Wed May 23, 2007 8:20 pm
i changed the css to this:
Code: Select all
#gifts {
width: 725px;
padding-left:100px;
}
html>body #gifts {
width: 725px;
padding-left:10px;
}
.gimage {
border: 1px solid;
border-color:#E4E4E4;
height:110px
}
.top {
float: left;
width: 200px;
text-align: center;
padding-left:20px;
padding-top:30px
}
.gdescription {
font-size:13px;
height:45px
}
.odescription {
font-size:13px;
}
.gprice {
font-size:13px;
color:#FF0000;
font-weight:bold
}
.gname {
color: #000000;
font-weight:bold
}
and got this:
http://nocc.thefreebielife.com/index.php
i dont know why im having such a problem
califdon
Jack of Zircons
Posts: 4484 Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA
Post
by califdon » Thu May 24, 2007 1:05 pm
Well, first, you didn't fix the second error I pointed out in my first response: the extra
html> before the body selector in your css.
Looking at the source code on the page you referenced, there is an extra <td> that's causing the first position in your layout to be blank. You are actually telling it that you want a blank position there:
Code: Select all
<TABLE WIDTH=900 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<tr align="center">
<td width="100%" valign="top">
<Td>
<Table style="width:200px "><tr><td><div class="top"><div class="gimage" align="center"><img src="giftimages/appletv.jpg" border="0"></div></td></tr>
<tr><td align="center"><div class="gname">Apple Tv</div></td></tr>Do you see that, after your <tr align="center", you have two <td>'s in a row?
thefreebielife
Forum Contributor
Posts: 126 Joined: Thu Apr 26, 2007 2:59 pm
Post
by thefreebielife » Thu May 24, 2007 6:21 pm
okay i changed that and the problem in style.css.
this is my code now..
Code: Select all
<TABLE WIDTH=900 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<td width="100%" valign="top">
<?
$ref = $_GET['r'];
if ($_GET['r'] != "") {
$rid = $_GET['r'];
}
//select the table
$result = mysql_query("select * from gifts order by gId");
$i = 1;
//grab all the content
while($r=mysql_fetch_array($result))
{
$gid=$r["gId"];
$gname=$r["gName"];
$gdescription=$r["gDescription"];
$gimage=$r["gImage"];
$gprice=$r["gPrice"];
?>
<Table style="width:200px "><tr><td><div class="top"><div class="gimage" align="center"><img src="<? echo "$gimage";?>" border="0"></div></td></tr>
<tr><td align="center"><div class="gname"><? echo "$gname"; ?></div></td></tr>
<tr><td><div class="gdescription"><? echo stripslashes($gdescription); ?></div></td></tr>
<tr><td><div class="gprice" align="left"><font color="#000000">Price:</font> $<? echo "$gprice"; ?><font color="#000000"> <a href="register.php?gid=<? echo "$gid"; ?>&&r=<? echo "$rid"; ?>">Get It Free</a></font><font color="#FF9900" style="font-weight:bold "></font> </div></td></tr>
</Table>
<?
if ($i % 3 == 0) { echo "</tr><tr>"; }
$i++;
}
?>
</td>
</tr>
</table>
http://www.nocc.thefreebielife.com/
i cannot figure out whats wrong i've never had a problem like this before.
califdon
Jack of Zircons
Posts: 4484 Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA
Post
by califdon » Fri May 25, 2007 3:31 pm
thefreebielife wrote: i dont know why im having such a problem
What problem are you referring to? The spacing problem seems to have been fixed.