Faz` Posted February 15, 2009 Posted February 15, 2009 I am currently encountering a problem, not a major one, but it is annoying me nonetheless. At the moment you will be aware v2 has an annoying gap on the left and right, I got rid of the gap on left, and the whole screen (banner, contents and all) has shifted all the way to the left, I have tried a lot of things to try and center all again without the gaps, however I have had no success at all, would anyone be able to help me out? It would be highly appreciated Quote
Dave Posted February 15, 2009 Posted February 15, 2009 Re: McCode v2 center A Screenshot would be incrediably helpful. Quote
03laceys Posted February 15, 2009 Posted February 15, 2009 Re: McCode v2 center PLease post header, or if it is a heavily edited and you don't want people to get their hands on it PM me i have fixed this problem a few times. Quote
POG1 Posted February 15, 2009 Posted February 15, 2009 Re: McCode v2 center The problem is that your basic template is tables inside tables. You will need to take the outer table out then set the width to 100% Quote
Faz` Posted February 15, 2009 Author Posted February 15, 2009 Re: McCode v2 center Aha ok thanks. That will be helpful...hopefully. The reason i did not post my code is I did not want to get spoon-fed, I am currently in the learning process, and I will never learn if people do it all for me, so thanks POG1, it should be helpful. Quote
AlabamaHit Posted February 15, 2009 Posted February 15, 2009 Re: McCode v2 center i agree with pog on this...But a screen shot would be nice...just so we can make sure we point you in theright direction. Quote
03laceys Posted February 15, 2009 Posted February 15, 2009 Re: McCode v2 center Haha we don't spoon-feed toooooo much here mate. How you doing? Long time no speak. Quote
Faz` Posted February 15, 2009 Author Posted February 15, 2009 Re: McCode v2 center Ok with a little help from someone, if you have a widescreen monitor (Which I do) the screen is shifted to the left, on a normal monitor, it is centred, is there any way you can make it compatible with both? Quote
Faz` Posted February 16, 2009 Author Posted February 16, 2009 Re: McCode v2 center Ok, I took POG1's advice, but I am completely clueless, I have fiddled around with the tables, validated the html, is there anything I'm doing wrong? Quote
John99 Posted February 16, 2009 Posted February 16, 2009 Re: McCode v2 center Post up a screen shot! Quote
Faz` Posted February 16, 2009 Author Posted February 16, 2009 Re: McCode v2 center I would, but I can't right now, my site is down due to some domain problems, however once its up I will. Quote
03laceys Posted February 16, 2009 Posted February 16, 2009 Re: McCode v2 center Faz mate i don't know what you have done but it only needed a simple div alignment. Quote
Faz` Posted February 16, 2009 Author Posted February 16, 2009 Re: McCode v2 center I haven't done anything, it appears centred on a normal monitor, but on a widescreen monitor like man it appears like I said it does, what I am trying to figure out is how I can make it so it looks centred for both, not just one or the other Quote
03laceys Posted February 16, 2009 Posted February 16, 2009 Re: McCode v2 center Well when you sent me the file bro i had it working fine of widescreen and normal. and i just though why i will msn you in a second. Quote
Faz` Posted February 16, 2009 Author Posted February 16, 2009 Re: McCode v2 center Hmm, weird, ok...thanks. Quote
Faz` Posted February 18, 2009 Author Posted February 18, 2009 Re: McCode v2 center Ok, I have tried everything, but have ended up in a mess. So had to resort back to my old header. I took POG1's advice and removed some tables, I fiddled about a bit and got rid of them, but once i tried to alter everything else, it all look out of position, would anyone possible be able to help me? Quote
AlabamaHit Posted February 18, 2009 Posted February 18, 2009 Re: McCode v2 center this needs to be deleted or somethign he don't want to show us nothing... WE CAN NOT HELP IF WE DON"T SEE THE PROBLEM!!!!!!!!!!!!!!!!!!!! Post a damn picture if youwant help.... Quote
Faz` Posted February 18, 2009 Author Posted February 18, 2009 Re: McCode v2 center Sheesh, sorry lol. Here is my header, I finally got access to my files :D <?php $count = 3; $x = -1; while($x < $count) { $places_to_be_secured = array("ID","viewforum","viewtopic"); $x++; $_GET[$places_to_be_secured[$x]] = abs(@intval($_GET[$places_to_be_secured[$x]])); } class headers { function startheaders() { global $ir, $set; echo <<<EOF <!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=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #000000; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: #FF0000;font-variant: small-caps;font-weight: bold; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #DEDEDE; } a:link { color: #FF0000;text-decoration: none;font-variant: small-caps;font-weight: normal; } ,a:visited { color: #FF0000;text-decoration: none;font-variant: small-caps;font-weight: normal; } ,a:active { color: #FFFFFF;text-decoration: none;font-variant: small-caps;font-weight: bold; } ,a:hover { color: #FFFFFF;text-decoration: underline overline;font-variant: small-caps;font-weight: bold; } a:visited { color: #FF0000;text-decoration: none;font-variant: small-caps;font-weight: normal; } a:active { color: #FFFFFF;text-decoration: none;font-variant: small-caps;font-weight: bold; } a:hover { color: #FFFFFF;text-decoration: underline overline;font-variant: small-caps;font-weight: bold; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: red;font-variant: small-caps; } .table2 { } .center { width:932px; background-color:#000000; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; : bold; background-color: #D6D6D6; } --> </style></head> <body> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color='red'>{$ir['username']}</font>";$d="[img=donator.gif]"; } if($ir['smoking'] > 100) { $smoking = "<font color=red>Addictive</font>"; } else { $smoking = "<font color=white>Not Addictive</font>"; } if($ir['smoking'] == 0) { $smoke = "Dont Smoke [[url='#'][size="1"]<font color=blue>Start</font>[/size][/url]]"; } else { $smoke = "$smoking"; } $gn=""; global $staffpage; $bgcolor = '000000'; print <<<OUT [img=lunapic-123051712647453.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] $gn{$u} [{$ir['userid']}] $d [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} [b]Crystals:[/b] {$ir['crystals']} OUT; if($ir['smoking'] > 0) { print " [b]Smoking Level:[/b] {$ir['smoking']} [b]Smoker:[/b] $smoke "; } print <<<OUT [[url='logout.php']Emergency Logout[/url]] <hr /> [b]Energy:[/b] {$enperc}% [img=greenbar.png][img=redbar.png] [b]Will:[/b] {$wiperc}% [img=bluebar.png][img=redbar.png] [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} [img=yellowbar.png][img=redbar.png] [b]EXP:[/b] {$experc}% [img=bluebar.png][img=redbar.png] [b]Health:[/b] {$hpperc}% [img=greenbar.png][img=redbar.png] <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> </html> OUT; } } ?> Quote
Faz` Posted February 18, 2009 Author Posted February 18, 2009 Re: McCode v2 center Can anybody help? Quote
BlueDevil23 Posted February 18, 2009 Posted February 18, 2009 Re: McCode v2 center Post a damn picture if youwant help.... Quote
AlabamaHit Posted February 18, 2009 Posted February 18, 2009 Re: McCode v2 center Faz sorry man i didnt know you didnt have access to them........ but honestly a screenshot would help alot....it would put us in the right area... Quote
Faz` Posted February 19, 2009 Author Posted February 19, 2009 Re: McCode v2 center I'm still a noob lol. Here is the screenshot. As you can see there is a big gap on the right, I have tried many things, but just can't get rid of the gap. Quote
AlabamaHit Posted February 19, 2009 Posted February 19, 2009 Re: McCode v2 center try adding <center> right after <body> in your header. Quote
Faz` Posted February 19, 2009 Author Posted February 19, 2009 Re: McCode v2 center Tried that, but all its done is bring the annoying gap on the left again. Thanks for trying ;) Quote
Faz` Posted February 19, 2009 Author Posted February 19, 2009 Re: McCode v2 center Ok, I've finally got it sorted. Thanks for all who helped. 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.