LearningCoder Posted May 14, 2013 Posted May 14, 2013 I want to add a right stats box on here, i have one on the left it starts from the stuff before, but i want to add one to the right side, anyone know how too? <table width="98%" border="0" cellpadding="0" cellspacing="0" > <tr> <table width="296" height="145" border="0" align="left" cellpadding="0" cellspacing="0" background="box.jpg"> <tr><td align="left"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td style="padding:2px;" width="100" height="100" class="item_cont" align="center"><img src=" <?php if($fetch->protection == "0"){ echo"/images/items/noprotection.png"; } elseif($fetch->protection == "Helmet"){ echo"/images/items/Helmet.png"; } elseif($fetch->protection == "StabVest"){ echo"/images/items/StabVest.png"; } elseif($fetch->protection == "RiotSheild"){ echo"/images/items/RiotSheild.png"; } elseif($fetch->protection == "Safehouse"){ echo"/images/items/Safehouse.png"; } elseif($fetch->protection == "ArmyBunker"){ echo"/images/items/ArmyBunker.png"; } elseif($fetch->protection == "BodyGuard"){ echo"/images/items/BodyGuard.png"; } ?> " width="100" height="100"></div></td> <td style="padding:2px;" width="100" height="100" class="item_cont" align="center"><img src=" <?php if($fetch->weapon == "0"){ echo"/images/items/noweapon.png"; } elseif($fetch->weapon == "G17"){ echo"/images/items/G17.png"; } elseif($fetch->weapon == "SA80"){ echo"/images/items/SA80.png"; } elseif($fetch->weapon == "M249"){ echo"/images/items/M249.png"; } elseif($fetch->weapon == "M16"){ echo"/images/items/M16.png"; } elseif($fetch->weapon == "AWP"){ echo"/images/items/AWP.png"; } ?> " width="100" height="100"></div></td> </tr> <tr> <td style="padding:2px;" width="90" class="item_cont" align="center"> <?php if($fetch->protection == "0"){ echo"No Protection"; }else{ echo"$fetch->protection"; } ?> </div></td> <td style="padding:2px;" width="90" class="item_cont" align="center"> <?php if($fetch->weapon == "0"){ echo"No Weapon"; }else{ echo"$fetch->weapon"; } ?> </div></td> </table></td></tr></table><div id="box"><img src=""></div></td> </tr></table></td> <td align="center" valign="top"><center><img width="1000" src="Banner.png"></div></td> </tr></table></td> </tr> </body> </html> Quote
rjddev Posted May 14, 2013 Posted May 14, 2013 In which section do you want the right table? at the top or? Quote
LearningCoder Posted May 14, 2013 Author Posted May 14, 2013 Yeah at the top, top right, as the way it is now we have a top left then banner and then top right we want, but dont know how too. Quote
rjddev Posted May 14, 2013 Posted May 14, 2013 If like this [ATTACH=CONFIG]952[/ATTACH] Then this should do the job <?php ?> <!DOCTYPE HTML> <html> <head> <title>Table Test</title> <style type="text/css"> </style> </head> <body> <table width="98%" border="0" cellpadding="0" cellspacing="0" > <tr> <table width="100%" align="right" cellpadding="0" cellspacing="0"> <tr> <td align="right">This table should be right</td> </tr> </table> <table width="296" height="145" border="0" align="left" cellpadding="0" cellspacing="0" background="box.jpg"> <tr><td align="left"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td style="padding:2px;" width="100" height="100" class="item_cont" align="center"><img src=" <?php if ($fetch->protection == "0") { echo"/images/items/noprotection.png"; } elseif ($fetch->protection == "Helmet") { echo"/images/items/Helmet.png"; } elseif ($fetch->protection == "StabVest") { echo"/images/items/StabVest.png"; } elseif ($fetch->protection == "RiotSheild") { echo"/images/items/RiotSheild.png"; } elseif ($fetch->protection == "Safehouse") { echo"/images/items/Safehouse.png"; } elseif ($fetch->protection == "ArmyBunker") { echo"/images/items/ArmyBunker.png"; } elseif ($fetch->protection == "BodyGuard") { echo"/images/items/BodyGuard.png"; } ?> " width="100" height="100"></div></td> <td style="padding:2px;" width="100" height="100" class="item_cont" align="center"><img src=" <?php if ($fetch->weapon == "0") { echo"/images/items/noweapon.png"; } elseif ($fetch->weapon == "G17") { echo"/images/items/G17.png"; } elseif ($fetch->weapon == "SA80") { echo"/images/items/SA80.png"; } elseif ($fetch->weapon == "M249") { echo"/images/items/M249.png"; } elseif ($fetch->weapon == "M16") { echo"/images/items/M16.png"; } elseif ($fetch->weapon == "AWP") { echo"/images/items/AWP.png"; } ?> " width="100" height="100"></div></td> </tr> <tr> <td style="padding:2px;" width="90" class="item_cont" align="center"> <?php if ($fetch->protection == "0") { echo"No Protection"; } else { echo"$fetch->protection"; } ?> </div></td> <td style="padding:2px;" width="90" class="item_cont" align="center"> <?php if ($fetch->weapon == "0") { echo"No Weapon"; } else { echo"$fetch->weapon"; } ?> </div></td> </table></td></tr> </table> <div id="box"><img src=""></div></td> </tr></table></td> <td align="center" valign="top"><center><img width="1000" src="Banner.png"></div></td> </tr></table></td> </tr> </body> </html> </body> </html> Quote
rjddev Posted May 14, 2013 Posted May 14, 2013 Done :) Also your php code is hard to read on those <img> tags... To make it more readable I would do if ($fetch->weapon == "0") { echo"/images/items/noweapon.png"; } elseif ($fetch->weapon == "G17") { echo"/images/items/G17.png"; } elseif ($fetch->weapon == "SA80") { echo"/images/items/SA80.png"; } elseif ($fetch->weapon == "M249") { echo"/images/items/M249.png"; } elseif ($fetch->weapon == "M16") { echo"/images/items/M16.png"; } elseif ($fetch->weapon == "AWP") { echo"/images/items/AWP.png"; } // To if ($fetch->weapon == "0") { $weaponPath = "/images/items/noweapon.png"; } elseif ($fetch->weapon == "G17") { $weaponPath = "/images/items/G17.png"; } elseif ($fetch->weapon == "SA80") { $weaponPath = "/images/items/SA80.png"; } elseif ($fetch->weapon == "M249") { $weaponPath = "/images/items/M249.png"; } elseif ($fetch->weapon == "M16") { $weaponPath = "/images/items/M16.png"; } elseif ($fetch->weapon == "AWP") { $weaponPath = "/images/items/AWP.png"; } // Then load them like this <img src="<?php echo $weaponPath;?>" /> Quote
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.