I want to ask something, which is about rank page....
I already found the code, and I make it not copy it from another tutorial,... I only learn from halls tutorials, thanks halls!
1. How to format the colour of anchor link inside the table?
This is my statistic.php
Code: Select all
<!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>
<link rel="icon" type="image/vnd.microsoft.icon" href="images/favicon.ico">
<link rel="stylesheet" href="gpack/inside.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Xevant - Browser Game</title>
<script language="javascript">
function toggle2() {
var ele = document.getElementById("toggleText");
var text = document.getElementById("displayText");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "<b><u>SHOW</u></b>";
}
else {
ele.style.display = "block";
text.innerHTML = "<b><u>HIDE</u></b>";
}
}
</script>
</head>
<body>
<?php
include_once "connect.php";
session_start();
?>
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
header('Location: login.php');
exit;
}
?>
<table width="1026" border="0">
<tr>
<td width="180"> </td>
<td width="528"><div align="center">
<?php include_once "TopBar.php"; ?>
</div></td>
<td width="304"> </td>
</tr>
<tr>
<td> </td>
<td><div align="center"><?php include_once "resource.php"; ?></div> </td>
<td> </td>
</tr>
</table>
<table width="1028" height="592" border="0">
<tr>
<td width="216" height="588"><table width="216" height="486" border="0">
<tr>
<td width="210" height="126"><table width="210" border="0">
<tr>
<td width="204" height="118"><?php include_once "sidebar_inside.php"; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td height="212"> <div><strong>
<?php include_once "plus_sidebar.php" ?>
</strong></div></td>
</tr>
<tr>
<td height="117"><?php include "village.php" ?></td>
</tr>
<tr>
<td height="21"> </td>
</tr>
</table></td>
<td style="border-left: 2px dotted white; padding: 5px;" width="580" bgcolor="#996600">
<table class="gridtable">
<tr>
<th width="98">UID</th>
<th width="141">Name</th>
<th width="141">Alliance</th>
<th width="141">Population</th>
<th width="141">Tribes</th>
<th width="141">Profession</th>
</tr>
<?php
include_once "player_status.php";
$rankinfo="SELECT * from players";
$rankinfo2=mysql_query($rankinfo) or die("could not select anything from the store.");
while($rankinfo3=mysql_fetch_array($rankinfo2))
{
$id = $rankinfo3['id'];
print "<tr class='tableLink'>
<td width='231'><div align='center'>$rankinfo3[id]</div></td>
<td width='157'><div align='center'><a href='profile.php?id=$id'>$rankinfo3[name]<a></div></td>
<td width='157'><div align='center'>$rankinfo3[ally]</div></td>
<td width='157'><div align='center'>$rankinfo3[population]</div></td>
<td width='157'><div align='center'>$rankinfo3[tribes]</div></td>
<td width='157'><div align='center'>$rankinfo3[class]</div></td>
</tr>";
}
?>
</table>
</td>
<td style="border-left: 2px dotted white; padding: 5px;" width="218"><table width="202" border="0">
<tr>
<td width="196" height="30"><?php include_once "rightbar_inside.php"; ?></td>
</tr>
<tr>
<td height="137"> </td>
</tr>
</table></td>
</tr>
</table>
<hr noshade="noshade" color="#FFFFFF" />
<p><?php include_once "footer.php" ?></p>
</body>
</html>
This is my inside.css
Code: Select all
@charset "utf-8";
/* CSS Document */
table.gridtable {
font-family: "Times New Roman";
font-size:16px;
color:#333333;
border-width: 1px;
border-color: #666666;
border-collapse: collapse;
}
table.gridtable th {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #666666;
background-color: #dedede;
}
table.gridtable td {
border-width: 1px;
border-style: solid;
border-color: #666666;
background-color: #ffffff;
border-collapse: collapse;
}
table.normal {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 0px;
border-color: #666666;
border-collapse: collapse;
}
table.normal td {
border-width: 0px;
border-style: solid;
border-color: #666666;
background-color: #ffffff;
border-collapse: collapse;
}
#table
{
border: 2px dotted white; padding: 5px;
}
input.btn {
color:#050;
font: bold 84% 'trebuchet ms',helvetica,sans-serif;
background-color:#fed;
border: 1px solid;
border-color: #696 #363 #363 #696;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#ffffffff',EndColorStr='#ffeeddaa');
}
input.btnhov {
border-color: #c63 #930 #930 #c63;
body {background-color:#996633;}
}
p {font-family: "Times New Roman", Times, serif; color:#FFFFFF}
.Sidebar {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color:#FFFFFF;
}
a:link {
text-decoration: none;
color:#FFFFFF; font-size:19px;
}
a:visited {
text-decoration: none;
color:#FFFFFF; font-size:19px;
}
a:hover {
text-decoration:underline;
color:#FFFF66; font-size:19px;
}
a:active {
text-decoration: none;
color:#FFFFFF; font-size:19px;
}
/*BEGIN THE ANCHOR STYLES*/
a:link.tableLink {
text-decoration: none;
color:#FFFFFF; font-size:19px;
}
a:visited.tableLink {
text-decoration: none;
color:#FFFFFF; font-size:19px;
}
a:hover.tableLink {
text-decoration:underline;
color:#FFFF66; font-size:19px;
}
a:active.tableLink {
text-decoration: none;
color:#FFFFFF; font-size:19px;
}
/*END OF THE ANCHOR STYLES*/
#VillageStats {
color: white; font-size:20px;
}
#Process {
color:#FFFFFF;
}
#village {
font-size: 22px; font-weight: bold; color:#FFFFFF
}
.othe {
text-decoration: none;
color:#FFFFFF; font-family:Verdana; font-size: 19px;
}
.Standard {font-family: "Times New Roman", Times, serif; color:#FFFFFF;}
.StandardHitam {font-family: "Times New Roman", Times, serif; color:#000000; font-size: 16px;}
#Standard {font-family: "Times New Roman", Times, serif; color:#FFFFFF;}
.HeadingKecil {font-size: 16px; font-weight: bold; color: #990000; font-family: Georgia, "Times New Roman", Times, serif; color:#FFFFFF}
.HeadingKecilHitam {font-size: 16px; font-weight: bold; color: #990000; font-family: Georgia, "Times New Roman", Times, serif; color:#000000}
#HeadingKecil {font-size: 16px; font-weight: bold; color: #990000; font-family: Georgia, "Times New Roman", Times, serif; color:#FFFFFF}
.SideBarKanan {font-family: "Times New Roman", Times, serif; color: #FFFFFF; color:#FFFFFF }
.style1 {color: #FFFFFF}
Myy second question is why the table are dropped until down?
How do I fix it? This problem is always happened to my sidebar, or rightbar.... So I need to strech the table manually using dreamweaver... It's pretty complicated, you know @_@
Last, how to sort the table from the population? Example, the highest population will go to the top on the table, and the second highest go into second rows, and so on and so on...
Please, I need your answers immediately.... And if you're willing to answer, please answer using complete answer, not only with 2 or 3 sentences, etc.