Bueno les explico un pequeño problema que tengo haber si alguien tiene una solucion ;).
Tengo una tabla HTML con un tamaño especificado en PX pero resulta que en un campo donde tengo texto, en este caso que pondre simplemente tengo una repiticion de 4's pero no se adapta al tamaño de la tabla. Si alguien tiene una idea de porque no funciona se lo agradeceria mucho:
Código HTML:
<!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>Shitges</title> </head> <body> <table width='594px' border='1px'> <tr> <td><img src='http://127.0.0.1:8888/shitges/images/imagenes_news/imagenNoticia5.jpg' width='200px' height='215px'></td> <td style='max-width:394px'; height='188px' style='vertical-align:top;'>PRUEBA<br>Posteado por dani el 2011-04-21<hr><p>444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444</p><td rowspan="1" width='5px' style='vertical-align:top;'>A</td></td> </tr> <tr><td colspan="3" align='right'>LEER MÁS</td></tr> </table> </body> </html>
Código:
Y aqui el apartado correspondiente al CSS:body { margin:0 0 0 0px; text-align:center; background-color:#ffffff; } #contenedor { text-align:left; width:924px; height:auto; margin:auto; padding-top:75px; } #cabecera { position:relative; width:924px; height:200px; } #cabeceraEntera { position:relative; width:924px; height:200px; background-image:url('./images/cabecera.png') } #buscadorCabeceraRight { width:440px; height:17px; position:absolute; right:185px; top:33px; } #tablaUsuario { width:150px; height:120px; position:absolute; right:135px; top:67px; } /*Cuerpo de la noticia: noticia, imagen noticia, noticia y indexacion*/ #cuerpo { margin:0px; background-image:url('./images/Dibujo.png') } #noticia { position:relative; width:924px; height:255px; background-image:url('./images/Dibujo1.png') } #imagenNoticia { position:relative; float:left; left:160px; top:20px; } #imagenNoticia.table, td { width:200px; height:215px; } /*Tamaño predeterminado para la imagen/video de la noticia*/ div.img img { width:200px; height:215px; } object { position:relative; top:-5px; max-width:275px; max-height:185px; } embed { position:relative; top:-5px; max-width:275px; max-height:185px; } iframe { position:relative; top:-5px; max-width:275px; max-height:185px; } #cuerpoNoticiaImagen { position:relative; top:20px; right:-150px; float:right; background-color:green; } #cuerpoNoticiaImagen.table, td { width:394px; height:188px; } #cuerpoNoticiaVideo { position:relative; top:20px; right:150px; width:320px; height:180px; float:right; background-color:green; } #numeroComentOVisits { position:absolute; text-align:center; padding-top:5px; right:5px; top:8px; width:35px; height:25px; background-color:red; } #leerMasImagen { position:absolute; text-align:center; padding-top:3px; left:674px; top:208px; width:100px; height:25px; background-color:yellow; } #leerMasVideo { position:absolute; text-align:center; padding-top:3px; left:674px; top:200px; width:100px; height:25px; background-color:yellow; } /*Numero de páginas*/ #indexacionNoticias { width:924px; height:262px; background-image:url('./images/arriba3.png') } #numeroIndexacion { position:relative; top:16px; left:227px; width:500px; height:50px; background-color:maroon; } /*Fin de noticia*/ #piedePagina { clear:both; width:924px; height:262px; background-image:url('./images/arriba4.png') } #piedePaginaCuerpo { position:relative; left:262px; top:15px; width:400px; height:50px; background-color:blue; }
Código PHP:
<div id="cuerpo">
<?php
$seleccionar_noticias="select id_noticia, titulo_noticia, creador_noticia, imagen_noticia, video_noticia, corta_noticia, fecha_noticia from noticias order by id_noticia desc";
$result=mysql_query($seleccionar_noticias);
while ($info_noticias=mysql_fetch_array($result)) {
$id_noticia=$info_noticias['id_noticia'];
$titulo_noticia=$info_noticias['titulo_noticia'];
$creador_noticia=$info_noticias['creador_noticia'];
$imagen_noticia=$info_noticias['imagen_noticia'];
$video_noticia=$info_noticias['video_noticia'];
$corta_noticia=$info_noticias['corta_noticia'];
$fecha_noticia=$info_noticias['fecha_noticia'];
if(empty($video_noticia)) {
echo "<div id='noticia'><table width='394px'>";
echo "<tr>";
echo "<td><div id='imagenNoticia' class='img'><img src='$imagen_noticia'></div></td>";
echo "<td><div id='cuerpoNoticiaImagen'>$titulo_noticia<br>Posteado por $creador_noticia el $fecha_noticia<hr><p>$corta_noticia</p></div></td>";
echo "</tr>";
echo "<div id='leerMasImagen'>LEER MÁS</div>";
echo "</table></div>";
}
elseif(empty($imagen_noticia)) {
echo "<div id='noticia'>";
echo "<div id='imagenNoticia'>$video_noticia</div>";
echo "<div id='cuerpoNoticiaVideo'>$titulo_noticia<br>Posteado por $creador_noticia el $fecha_noticia<div id='numeroComentOVisits'>11</div><hr><p>$corta_noticia</p></div>";
echo "<div id='leerMasVideo'>LEER MÁS</div>";
echo "</div>";
}
elseif(empty($imagen_noticia) and ($video_noticia==NULL)) {
echo "Error en la imagen o video de la noticia";
}}
echo "<img src='./images/Dibujo2.png'>";
?>
<div id="indexacionNoticias">
<div id="numeroIndexacion"></div>
</div>