Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Paschoal Rizzo

Erro na exibição

Recommended Posts

Estou com problema sistema de noticias, esta td rodando perfeitamente, só que quando eu adiciono uma noticia com imagem pelo sistema, as colunas deveriam ficar uma embaixo da outra, se não tiver imagem da certinho, mais quando tem uma imagem, a coluna do titulo fica do lado da umagem e não embaixo como deveria...

 

De uma olhadinha pra entender mais....

 

Site

 

 

Se aguem puder me ajudar ficarei muito grato.

 

 

SEGUE ABAIXO O CODIGO...

 

---------------------------------------------------------------------------

 

 

<? include "dbconfig.php"; ?>

<html>

<head>

<title>Notícias</title>

<link href="estilo.css" rel="stylesheet" type="text/css">

<script>

function Imprimir(pagina)

{

var altura = 400;

var largura = 600;

var a = (screen.height/2)-(altura/2);

var l = (screen.width/2)-(largura/2);

window.open(pagina,'imprimir','width='+largura+',height='+altura+',top='+a+',left='+l+',scrollbars=1');

}

</script>

</head>

<body bgcolor="#FFFFFF">

<table width="448" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr valign="top">

<td width="4" height="250%">

 </td>

<td width="440" height="88%">

<table width="100%" border="0" cellspacing="0" cellpadding="4">

<tr>

<td>

<? if ($id == "") {

if ($form_palavra != "") {

$busca = " AND (titulo LIKE '%$form_palavra%' OR noticia LIKE '%$form_palavra%')";

if ($form_editoria != "") {

$busca.= " AND id_editoria=$form_editoria";

}

} elseif ($id_editoria != "") {

$busca = " AND id_editoria=$id_editoria";

}

if ($pagina == "" or $pagina == 1) { ?>

<? } ?>

<p>

<?

// PAGINAÇÃO INÍCIO

if ($pagina=="") $pagina=1;

$registros_por_pagina = 100; // Aqui diz qual a quantidade de registros por pagina

$inicio = ($pagina-1)*$registros_por_pagina;

 

$sql = mysql_query("SELECT * FROM noticias WHERE ativa $busca ORDER BY data DESC");

$total = mysql_num_rows($sql);

$num_paginas = intval($total/$registros_por_pagina);

// PAGINAÇÃO FIM

$sql = mysql_query("SELECT * FROM noticias WHERE ativa $busca ORDER BY data DESC LIMIT $inicio,$registros_por_pagina");

while ($coluna = mysql_fetch_array($sql)) { ?>

 

 

 

<table border="1" width="100%" id="table1" cellspacing="0" cellpadding="0" bordercolor="#FFB03C" bgcolor="#FFB03C">

<tr>

<td><center><p class="Titulo"><?=$coluna[titulo];?></center></p></td>

</tr>

</table>

<? if ($coluna[imagem] != "") { ?>

<img src="<?=$coluna[imagem];?>" hspace="8" vspace="8" align="left">

<? } ?>

<?=nl2br($coluna[noticia]);?>

<? } ?>

<? }?>

 

</td>

</tr>

</table>

</td>

<td width="4" bgcolor="#FFFFFF">

 </td>

</tr>

</table>

</body>

</html>

<? mysql_close();

function inteirodata($data)

{

if ($data != "") {

$data = substr($data,6,2)."/".substr($data,4,2)."/".substr($data,0,4);

return $data;

}

}

function datainteiro($data)

{

$data = substr($data,6,4).substr($data,3,2).substr($data,0,2);

return $data;

}

?>

 

 

 

----------------------------------------------------------------------------------------------------

 

 

GRATO PASCHOAL RIZZO

Compartilhar este post


Link para o post
Compartilhar em outros sites

Isso é html.A tag img tem o atributo align = left.Movido PHP => Webstandards: CSS / XML / XHTML

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tente adequar seu site aos padrões, usando css pra formatação ;)

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.