Im going straight to the problem.
I got this piece of code that shows a pseudo-map with all the current villages in game.
Code: Select all
$mapDiv = '<div id="map">';
$villageQuery = mysql_query("SELECT * FROM `aldeias`");
while( $village = mysql_fetch_assoc($villageQuery) )
{
// village div should be aligned to center of its axes, not to the top right corner
// therefore we take half the div height and width of its position
$mapVillageX = $village['x']; // 25 = 50/2 (50px)
$mapVillageY = $village['y']; // 25 = 50/2 (50px)
$name = $village['nome'];
$mapDiv .= '<div class="village" style="top: '. $mapVillageY .'px; left: '. $mapVillageX .'px">
<a href="village.php?x='. $village['x'] .'&y='. $village['y'] .'">'.$name.'<br>' . $village['x'] . "," . $village['y'] . '</a>
</div>';
}
echo $mapDiv . '</div>';
Well the problem is, the name uses too much space and i want to hide it but if the player puts the mouse over the square of a village i want it to show the name of the village with the hyperlink to village.php?...
Is it possible?
Thanks a lot