...

View Full Version : Tables not displaying correctly.



syncupsolutions
11-25-2010, 07:02 AM
Hey everyone, new to the forum. Having a problem here.

I'm creating a news script, client side at the moment. This can be viewed at http://www.syncupsolutions.net/hosting

As you can see if you viewed the page, the first news table is displaying fine, but the following tables are missing the top images, and both side images that repeat depending on the length. It is also not wrapping the texts to fit inside the div like it is on the first instance. Here is the code to my home page index.php, the style.css that goes with it, and the index.php to news. Forgive the gibberish in the tables, it was the quickest way I knew to get multiple lines.

hosting/index.php


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sync-Up Hosting Solutions</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="wrapper">
<div id="header-wrapper">
<div id="header"></div>
</div>

<!--Body Start in Content-->

<div id="content">
<div id="news">
<?php include("news/index.php");?>
</div>
<div id="featured">
<div id="featuredtext">Our Base VPS package is featured this month
due to it's high demand, and it's low price of
only $25.00 per/Month! Free Setup, 1 hour wait
maximum for activation, and full root access. This
is the ideal package for any small business just
starting out. Dont wait, order today !</div>
<div id="featuredtextTITLE"></div>
<div id="featuredimg"></div>
<p><br />
<br />
</p>
<p><br />
<br />
<br />
&nbsp;&nbsp;<img src="ads/ordernow.png" width="120" height="25" alt="Order Now" /> <img src="ads/moreinfo.png" width="120" height="25" alt="More Info" /><br />
</p>
</div>
<div id="mnuTop"><img src="images2/mnuTop.png" width="800" height="30" /></div>
<div id="leftWrapper">
<div id="clientlogin">
<div style="position:absolute; width:180px; height:16px; left: 9px; top: 29px; font-family:helios; font-size:12px;" id="loginform">
<form id="form1" name="form1" method="post" action="">
Username:<br />
<input type="text" name="username" id="username" />
<br />
<br />
Password:<br />
<input type="password" name="password" id="password" />
<br />
Lost password ?<br />
<br />
<input align="right" style="height:25px; font-family:Helios;" type="submit" name="button" id="button" value="Submit" />
<input align="right" style="height:25px; font-family:Helios;" type="reset" name="button2" id="button2" value="Reset" />
</form>
</div></div>
</div>
</div>
</body>
</html>


style.css


body{
}
#wrapper{
position:absolute;
left:0px;
top:0px;
width:100%;
height:735px;
}
#header-wrapper{
background-image:url(images2/header-repeat.png);
position:absolute;
top:0px;
left:0px;
width:100%;
height:180px;
background-repeat:repeat-x;
}
#header{
background-image:url(images2/header.png);
width:662px;
height:180px;
position:absolute;
top:0px;
left:2px;
background-repeat:no-repeat;
}
#content{
position:absolute;
width:100%;
height:773px;
position:absolute;
top:180px;
left:0px;
}

#mainContent{
float:left;
width:68%;
height:100%;
float:left;
}
#mnuTop{
float:left;
width:100%;
height:30px;
background-image:url(images2/repeater.png);
background-repeat:repeat-x;
}
#leftWrapper{
width:219px;
position:absolute;
top:29px;
height:798px;
border-right: dashed thin #ea9447;
left: 4px;
}
#rightWrapper{
position:absolute;
width:126px;
left:1201px;
top:30px;
height:798px;
border-left: dashed thin #ea9447;
}
#clientlogin{
background-image:url(images2/clientlogin.png);
width:198px;
height:184px;
position:absolute;
left:6px;
top:1px;
}
#featured{
width:732px;
height:171px;
position:absolute;
left:229px;
top:34px;
background:url(ads/featuredbg.png);
}
#featuredimg{
background-image:url(ads/VPS.jpg);
width:104px;
height:129px;
position:absolute;
left: 303px;
top: 28px;
}
#featuredtextTITLE{
background-image:url(ads/featuredtexttitle.png);
position:absolute;
width:304px;
height:134px;
left: 415px;
top: 23px;
font-family:Helios;
font-style:italic;
color: #DF8C3F;

}
#featuredtext{
position:absolute;
width:277px;
height:88px;
font-family:Helios;
font-style:bold;
font-size:12px;
top: 32px;
left: 8px;
}
#news{
width:732px;
height:528px;
position:absolute;
left:230px;
top:221px;
font-family:Helios;
font-size:12px;
}


news/index.php


<?php
include('inc/config.php');
$query="SELECT * FROM news";
$result=mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
$title=$row['title'];
$content=$row['content'];
$poster=$row['poster'];
echo"

<table width=\"732\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td style=\"background-image:url(news/images/news_01.png);\"width=\"16\" height=\"50\">&nbsp;</td>
<td style=\"background-image:url(news/images/news_02.png);\" width=\"696\" height=\"50\"> $title </td>
<td style=\"background-image:url(news/images/news_03.png);\" width=\"20\" height=\"50\">&nbsp;</td>
</tr>
<tr>
<td style=\"background-image:url(news/images/news_04.png); background-repeat:repeat-y;\" width=\"16\" height=\"10\">&nbsp; </td>
<td>$content</td>
<td style=\"background-image:url(news/images/news_06.png); background-repeat:repeat-y;\" width=\"16\" height=\"10\">&nbsp;</td>
</tr>
<tr>
<td style=\"background-image:url(news/images/news_07.png);\" width=\"16\" height=\"40\">&nbsp;</td>
<td style=\"background-image:url(news/images/news_08.png);\" width=\"696\" height=\"40\">$poster</td>
<td style=\"background-image:url(news/images/news_09.png);\" width=\"20\" height=\"40\">&nbsp;</td>
</tr>
</table>
<br><br>";
}

?>


Thanks in advance.

syncupsolutions
11-25-2010, 08:33 AM
No ideas ?

djm0219
11-25-2010, 12:29 PM
Can you be a bit more specific? The testnews, test2 and test3 divs appear to be complete and the text within them appears to be wrapping within the divs just fine.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum