Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/02/2012, 22:40
RGT
Usuario no validado
 
Fecha de Ingreso: noviembre-2008
Mensajes: 505
Antigüedad: 15 años, 5 meses
Puntos: 5
Respuesta: Problema al colocar imagen encima de otra imagen

Aqui el codigo que tengo actualmente:

Código PHP:
Ver original
  1. <div id="disco-aleatorio">
  2.  
  3.                 <?php
  4.                     query_posts(array('orderby' => 'rand', 'showposts' => 1));
  5.                     if (have_posts()) :
  6.                     while (have_posts()) : the_post();
  7.                 ?>
  8.                
  9.                 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('medium'); ?></a>
  10.                
  11.                 <div class="popular">POPULAR!</div>
  12.                
  13.                 <h2><a href="<?php the_permalink(); ?>" title="<?php the_title() ?>"><?php the_title(); ?></a></h2>
  14.  
  15.         <?php endwhile; endif; ?>
  16.  
  17.         <?php wp_reset_query(); ?>
  18.        
  19.   </div>

Código CSS:
Ver original
  1. #disco-aleatorio {
  2.     float:right;
  3.     background-color:#FFF;
  4.     border: 1px #ccc solid;
  5.     padding: 2px;
  6.     -webkit-border-radius: 2px;
  7.     -moz-border-radius: 2px;
  8.     border-radius: 2px;
  9.     height:140px;
  10.     position: relative;
  11. }
  12.  
  13. #disco-aleatorio img {
  14.     width:236px;
  15.     height:140px;
  16. }
  17.  
  18. #disco-aleatorio a {
  19.     color: white;
  20.     font-weight: bold;
  21.     text-decoration: none;
  22. }
  23.            
  24. #disco-aleatorio a:hover {
  25.     text-decoration: underline;
  26.     color: white;
  27. }
  28.                
  29. #disco-aleatorio:hover {
  30.     background-color:#2fb6f6;
  31. }
  32.  
  33. #disco-aleatorio h2 {
  34.     position: absolute;
  35.     right: 2px;
  36.     bottom: 2px;
  37.     background: rgba(0,0,0,0.6);
  38.     width: 226px;
  39.     padding: 5px;position: absolute;
  40. }
  41.  
  42. .popular {
  43.     position:absolute;
  44.     top:2px;
  45.     left:2px;
  46.     background-color:#a42c2c;
  47.     color:#FFF;
  48.     padding:5px;
  49.     font-weight:bold;
  50.     letter-spacing: 1px;
  51.         -webkit-border-bottom-right-radius: 2px;
  52.         -moz-border-radius-bottomright: 2px;
  53.         border-bottom-right-radius: 2px;
  54. }

Que tengo mal?

mira el espaciote que tengo:
http://oi43.tinypic.com/8wwm6c.jpg