zeilenumbruch erzwingen
Verfasst: 20.02.2005 22:28
hallo. wenn ich bilder meiner bildergalerie aufliste so entsteht eine lange reihe von bildern. das hat zur folge, dass man immer horizontal scrollen muss. wie kann ich einen zeilenumbruch nach jedem 4. bild erzwingen?
bilder werden mittels db ausgelesen und mit schleife übertragen:
und dann noch:
bilder werden mittels db ausgelesen und mit schleife übertragen:
Code: Alles auswählen
$sql = "SELECT picture_content_id, picture_content_link, picture_content_title FROM " . PICTURE_CONTENT_TABLE . " WHERE picture_categorie_id='" . $_GET['picture_categorie_id'] . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$template->assign_block_vars('picture_content', array(
'I_IMAGE' => '<img src="images/' . rawurlencode($picture_categorie) . '/thumbs/' . rawurlencode($row['picture_content_link']) . '" alt="' . $row['picture_content_title'] . '" title="' . $row['picture_content_title'] . '" width="150" height="113" border="0" />',
'L_IMAGE' => $row['picture_content_title'],
'U_IMAGE' => 'index.' . $phpEx . '?show=picture_gallery&picture_categorie=' . $picture_categorie . '&picture=' . rawurlencode($row['picture_content_link']) . '&picture_title=' . $row['picture_content_title'] )
);
}
Code: Alles auswählen
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<!-- BEGIN picture_content -->
<td><a href="{picture_content.U_IMAGE}" onclick="MapWindow()" target="image" title="{picture_content.L_IMAGE}">{picture_content.I_IMAGE}</a></td>
<!-- END picture_content -->
</tr>
</table>