Hola gente, tengo un pequeño desfazaje entre dos span:
(por si no lo notan, esta entre deportes y mundo)
La tabla está generada con php:
Código PHP:
<table border="0" cellspacing="3">
<?php $carga = "SELECT enlaces,fecha FROM enlaces ORDER BY id DESC";
$consult = mysql_query($carga) or die ("error en query:".mysql_error());
$res = mysql_fetch_array($consult) or die ("error en array sql");
$arr = explode(" ", $res['enlaces']);
$interno = 0;
$long = count($arr);
if ( $long == 1 ) {
$consul="SELECT id,titulo,subtitulo,contenido,audio,audiolink,fecha FROM ".$arr[0]." WHERE fecha='".$res['fecha']."' ORDER BY id DESC";
$dos=mysql_query($consul) or die("error en consulta a campo de enlace:" . mysql_error());
$noticias=mysql_fetch_array($dos);
} else {
foreach ( $arr as $key => $value ) {
if ($arr[$key] == NULL) {
unset($arr[$key]);
} };
foreach ( $arr as $clave => $valor ) {
$interno++;
$min='';
$consul="SELECT id,titulo,subtitulo,contenido,audio,audiolink,fecha FROM ".$valor." WHERE fecha='".$res['fecha']."' ORDER BY id DESC";
$dos=mysql_query($consul) or die("error en consulta a campo de enlace:" . mysql_error());
$noticias=mysql_fetch_array($dos);
if (($mod = fmod($interno, 2)) != 0){
echo "<tr><td valign=\"top\"><a href=\"categoria.php?c=".$valor."\" class=\"categoria\">".$valor."</a>"; }
else { echo "<td valign=\"top\"><a href=\"categoria.php?c=".$valor."\" class=\"categoria\">".$valor."</a>"; }
$totales = count($noticias);
$year=substr($noticias['fecha'],0,4);
$dia=substr($noticias['fecha'],8,2);
$month=substr($noticias['fecha'],5,2);
settype($month,'integer');
$extrae = '/<img .*src=["\']([^ ^"^\']*)["\']/';
preg_match_all( $extrae , $noticias['contenido'] , $matches );
if($matches)
{
if ( $matches[1] != NULL ){
$min ='<img src="'.$matches[1][0].'" alt="" class="thumb">';
}} if ( empty($min) ) {
$min = ' ';
}
$contenido = cortarTexta($noticias['contenido'], 400);
echo "<span class=\"destacado\">" . $min . "<a href=\"ver.php?id=" . $noticias['id'] . "&t=" . $valor ."\" class=\"titulo\">" . $noticias['titulo'] . "</a>".$contenido."<a href=\"ver.php?id=".$noticias['id']."&t=".$valor."\" class=\"leermas\">...(Leer más)</a></span>";
echo "</td>";
if (($mod = fmod($interno, 2)) == 0){
echo "</tr>";
}
} }
?></table>
Y ésta es la clase "categoria" que aparentemente es donde se produce esa distancia de creo yo, que es uno o dos pixeles:
Código:
.categoria {
color:#EAE36C;
font:12pt "Trebuchet MS";
width:100%;
background:url(http://www.milperdonesweb.com.ar/Images/f_menu.png) repeat-x;
display:block;
text-transform: capitalize;
text-decoration:none;
letter-spacing:-1.2pt;
margin-top:0;
padding:3px;
}
table tr:first-child td:first-child{padding:0;margin:0;}
Ya la verdad que hace bastante que estoy revisando todo, y no logro encontrar que es lo que lo produce, porque teoricamente supongo que tendrian que estar bien alineados, o me equivoco?
Saludos, y muchas gracias por su ayuda de antemano!