onthespot Posted July 10, 2009 Share Posted July 10, 2009 Ok this is doing my head in! Been trying to work it out all day. <div id="col-two"> <div class="boxed"> <div class="content"> <blockquote> <p>"<? echo "".$req_user_info['comment'].""; ?>"</p> </blockquote> <table align="left" width="100%" style='border: 1px dotted;' > <tr> <td> <? $gamertag = $req_user_info['username'];?> <div align="left"><? echo "<h3><a href=\"http://live.xbox.com/en-US/profile/FriendsMgmt.aspx?gt=$gamertag&act=Add' target='_blank\">Add me X360</a></h3>"; if(strcmp($session->username,$req_user) == 0){ echo "<h3><br><a href=\"useraccount.php?user=$session->username\">Change Settings</a><br></h3>"; } ?> </div> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table><br> <table align="left" width="100%"> <tr><td> <div align="left"><? echo "<h4>".$req_user_info['username']."'s Information</h4>"; ?></div> </td></tr> <tr> <td> </td> </tr> </table><br> <table align="left" width="48%" style='border: 1px dotted;' bgcolor="#eeeeee" > <tr> <td> <? echo "<b><u>Gamertag:</u></b> ".$req_user_info['username']."<br>"; ?> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <? echo "<b>Name:</b> ".$req_user_info['name1']."<br>"; ?> </td> </tr> <tr> <td> <? echo "<b>Location:</b> ".$req_user_info['location']."<br>"; ?> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <? echo "<b>Xbox 360 gamertag:</b> ".$req_user_info['x360gt']."<br>"; ?> </td> </tr> <tr> <td> <? echo "<b>playstation 3 gamertag:</b> ".$req_user_info['ps3gt']."<br>"; ?> </td> </tr> <tr> <td> <? echo "<b>PC gamertag:</b> ".$req_user_info['pcgt']."<br>"; ?> </td> </tr> </table> <table align="right" width="48%" style='border: 1px dotted;' bgcolor="#eeeeee"> <tr> <td> <b><u>AWARDS:</u></b> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <b><u>RECOGNITION:</u></b> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr><tr> <td> </td> </tr> </table> <table> <tr> <td> </td> </tr> </table> <table width="100%" style='border: 1px dotted;' bgcolor="#eeeeee"> <tr><td><h4>Comments</h4></td></tr> <tr><td><form action="comment.php?user=<?php echo $_GET['user']; ?>" method="POST"></td></tr> <tr><td><textarea name="comment" rows="4" cols="67" ></textarea></td></tr> <tr><td><div align="right"><input type="submit" name="submit" value="Add Comment"></div></td></tr> <tr><td></form></td></tr> </table><br> <a name="comments"></a> <? $match= $req_user_info['username']; $res=mysql_query("SELECT * FROM ".TBL_COMMENTS." WHERE touser = '$match' ORDER BY commentdate DESC"); while($row=mysql_fetch_assoc($res)){ $fromuser=$row['fromuser']; $comment=$row['comment']; $commentdate=$row['commentdate']; $date=strtotime($commentdate); $final_date=date("g:i a", $date); $final_date2=date("F j Y", $date); ?> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><?echo "<a href=\"userprofile.php?user=$fromuser\"><b>$fromuser</b></a> commented:\n";?></td></tr> <tr><td><?echo "at $final_date on $final_date2\n";?></td></tr> <tr bgcolor="#ffffff"><td><?echo "$comment\n";?></td></tr> </table><br> <? } ?> </div> </div> </div> can anyone see any problems here? and this is the css to go with #col-two { float: left; width: 600px; margin-right: 5px } #col-two .boxed { margin-bottom: 50px; } #col-two .boxed .title { padding: 19px 19px 0 19px; } #col-two .boxed .content { padding: 19px 19px 0 19px; background: #ffffff; } #col-two .boxed blockquote { background: #E5ECED url(images/img08.gif) repeat-x; } I cant get any space between the tables, annoying me! cheers Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 10, 2009 Share Posted July 10, 2009 you need to go in detail on what you are talking about. which tables? there are several. also, if this is an HTML/CSS problem, don't include the PHP. Do a view source on the page and post the generated code. That way, we can load it up on our computer and see what you see. your PHP code won't run on our environments, since we don't have your databases. Quote Link to comment Share on other sites More sharing options...
onthespot Posted July 10, 2009 Author Share Posted July 10, 2009 I do apologise dude, I kept the php purely because I thought that might have an effect, however since reading your post, it's very obvious if I think that you can't test my php. I shal review my post. <div id="col-two"> <div class="boxed"> <div class="content"> <blockquote> <p>"Live together die alone......"</p> </blockquote> <table align="left" width="100%" style='border: 1px dotted;' > <tr> <td> <div align="left"><h3><a href="http://live.xbox.com/en-US/profile/FriendsMgmt.aspx?gt=admin&act=Add' target='_blank">Add me X360</a></h3><h3><br><a href="useraccount.php?user=admin">Change Settings</a><br></h3></div> </td> </tr> CANT BREAK HERE <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table><br> <table align="left" width="100%"> <tr><td> <div align="left"><h4>admin's Information</h4></div> </td></tr> <tr> <td> </td> </tr> </table><br> <table align="left" width="48%" style='border: 1px dotted;' bgcolor="#eeeeee" > <tr> <td> <b><u>Gamertag:</u></b> admin<br></td> </tr> <tr> <td> </td> </tr> <tr> <td> <b>Name:</b> <br></td> </tr> <tr> <td> <b>Location:</b> england<br></td> </tr> <tr> <td> </td> </tr> <tr> <td> <b>Xbox 360 gamertag:</b> no?<br></td> </tr> <tr> <td> <b>playstation 3 gamertag:</b> luke<br></td> </tr> <tr> <td> <b>PC gamertag:</b> luke<br></td> </tr> </table> <table align="right" width="48%" style='border: 1px dotted;' bgcolor="#eeeeee"> <tr> <td> <b><u>AWARDS:</u></b> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <b><u>RECOGNITION:</u></b> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr><tr> <td> </td> </tr> </table> <table> <tr> <td> </td> </tr> </table>CANT BREAK HERE <table width="100%" style='border: 1px dotted;' bgcolor="#eeeeee"> <tr><td><h4>Comments</h4></td></tr> <tr><td><form action="comment.php?user=admin" method="POST"></td></tr> <tr><td><textarea name="comment" rows="4" cols="67" ></textarea></td></tr> <tr><td><div align="right"><input type="submit" name="submit" value="Add Comment"></div></td></tr> <tr><td></form></td></tr> </table><br> <a name="comments"></a> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Luke"><b>Luk</b></a> commented: </td></tr> <tr><td>at 12:29 pm on July 10 2009 </td></tr> <tr bgcolor="#ffffff"><td>i am writing a new comment here </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Luke"><b>Luk</b></a> commented: </td></tr> <tr><td>at 4:51 pm on July 8 2009 </td></tr> <tr bgcolor="#ffffff"><td>sssssssssssssssssss </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Guest"><b>Guest</b></a> commented: </td></tr> <tr><td>at 12:04 pm on July 7 2009 </td></tr> <tr bgcolor="#ffffff"><td>elooooooooooooooooooo </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Luke"><b>Luke</b></a> commented: </td></tr> <tr><td>at 1:25 am on July 7 2009 </td></tr> <tr bgcolor="#ffffff"><td>awesome admin this guy </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Luke"><b>Luke</b></a> commented: </td></tr> <tr><td>at 11:05 pm on July 6 2009 </td></tr> <tr bgcolor="#ffffff"><td>top player and top guy </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Luke"><b>Luke</b></a> commented: </td></tr> <tr><td>at 7:42 pm on July 6 2009 </td></tr> <tr bgcolor="#ffffff"><td>markus uthere? </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Luk"><b>Luke</b></a> commented: </td></tr> <tr><td>at 7:38 pm on July 6 2009 </td></tr> <tr bgcolor="#ffffff"><td>please work </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=Luke"><b>Luke</b></a> commented: </td></tr> <tr><td>at 6:44 pm on July 6 2009 </td></tr> <tr bgcolor="#ffffff"><td>SDAS </td></tr> </table><br> <table align="center" width="100%"style='border: 1px dotted;'bgcolor="#eeeeee" > <tr><td><a href="userprofile.php?user=luke"><b>luke</b></a> commented: </td></tr> <tr><td>at 4:41 pm on July 6 2009 </td></tr> <tr bgcolor="#ffffff"><td>geeeeeez </td></tr> </table><br> </div> </div> </div> Thats the html, this is the css #col-two { float: left; width: 600px; margin-right: 5px } #col-two .boxed { margin-bottom: 50px; } #col-two .boxed .title { padding: 19px 19px 0 19px; } #col-two .boxed .content { padding: 19px 19px 0 19px; background: #ffffff; } #col-two .boxed blockquote { background: #E5ECED url(images/img08.gif) repeat-x; } Ok so my problem is I can't get a break in between the tables where I have wrote CANT BREAK HERE. If anyone could help here, would be appreciated. Quote Link to comment Share on other sites More sharing options...
haku Posted July 11, 2009 Share Posted July 11, 2009 What do you mean by 'can't get a break'? You mean you can't get space? Why not just close your table there, and start another one after that? Although truth be told, you shouldn't be using tables for layout anyways. Quote Link to comment Share on other sites More sharing options...
onthespot Posted July 11, 2009 Author Share Posted July 11, 2009 I have tried different tables, using the <br> and nothing works! Honestly, there is something wrong and it just won't move down. What would you suggest other than tables then? Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 11, 2009 Share Posted July 11, 2009 XHTML and CSS my friend. Try using divs and css instead of tables. It takes some time to get used to but its pretty easy. I don't have a link for you but if you google tableless layout you should find something. Quote Link to comment Share on other sites More sharing options...
onthespot Posted July 11, 2009 Author Share Posted July 11, 2009 Ok thanks mate, will work better than this no doubt, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.