перенос картинки на другую строку

A
На сайте с 04.04.2013
Offline
0
665

Доброго времени суток.

Возникла проблема - на сайте все картинки распологаются в одну строку, выходя за пределы сайта... вопрос в следующем - как сделать так что бы картинки размещались в столбец? например по 10 картинок на 10 столбцах...

вот скрипт сайта:



<?php


include('mysql.php');
include('functions.php');

// Get the top10
$result = mysql_query("SELECT *, ROUND(score/(1+(losses/wins))) AS performance FROM images ORDER BY ROUND(score/(1+(losses/wins))) DESC LIMIT 0,100");
while($row = mysql_fetch_object($result)) $top_ratings[] = (object) $row;

// Close the connection
mysql_close();


?>
<!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=utf-8" />
<title>FaceRating</title>
<style type="text/css">

body, html {font-family:Arial, Helvetica, sans-serif;width:100%;margin:0;padding:0;text-align:center;}
h1 {background-color:#9CC96B;color:#fff;padding:20px 0;margin:0;}
a img {border:0;}
td {font-size:11px;}
.image {background-color:#eee;border:1px solid #ddd;border-bottom:1px solid #bbb;padding:5px;}

</style>
</head>

<body>
<h1>Top Rated</h1>
<center>
<table>
<tr>
<? foreach($top_ratings as $key => $image) : ?>
<td valign="top"><img src="images/<?=$image->filename?>" width="80"/></td>
<? endforeach ?>
</tr>
<tr>
<? foreach($top_ratings as $key => $image) : ?>
<td valign="top">Score: <?=$image->score?></td>
<? endforeach ?>
</tr>
<? /*
<tr>
<? foreach($top_ratings as $key => $image) : ?>
<td valign="top">Position: <?=$image->position?></td>
<? endforeach ?>
</tr>
<tr>
<? foreach($top_ratings as $key => $image) : ?>
<td valign="top">Performance: <?=$image->performance?></td>
<? endforeach ?>
</tr>
<tr>
<? foreach($top_ratings as $key => $image) : ?>
<td valign="top">Won: <?=$image->wins?></td>
<? endforeach ?>
</tr>
<tr>
<? foreach($top_ratings as $key => $image) : ?>
<td valign="top">Lost: <?=$image->losses?></td>
<? endforeach ?>
</tr>
*/ ?>
</table>
</center>

md5by
На сайте с 30.12.2011
Offline
68
#1

Сделай вот так :)


<center>
<table>
<? foreach($top_ratings as $key => $image) : ?>
<tr>
<td valign="top"><img src="images/<?=$image->filename?>" width="80"/></td>
<td valign="top">Score: <?=$image->score?></td>
<td valign="top">Position: <?=$image->position?></td>
<td valign="top">Performance: <?=$image->performance?></td>
<td valign="top">Won: <?=$image->wins?></td>
<td valign="top">Lost: <?=$image->losses?></td>
</tr>
<? endforeach ?>
</table>
</center>
A
На сайте с 04.04.2013
Offline
0
#2
md5by:
Сделай вот так :)

От души спасибо)))

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий