Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/05/2010, 11:59
xyz3d
 
Fecha de Ingreso: mayo-2010
Mensajes: 24
Antigüedad: 13 años, 11 meses
Puntos: 0
Respuesta: Posicionar imagen CSS/html

Gracias por tu respuesta MasterOjitos. He probado esos cambios y la imagen y el texto se pasan a la tabla de abajo del slideshow. Te copio todo el código para que lo veas más claro.

En el index.html copié el <script> y el <div id="slideshow">, el archivo del .js no lo he modificado...

Código HTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Petit Cafe</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link href="style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="jquery-1.2.6.min.js"></script>

<script type="text/javascript">

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});

</script>

</head>

<body>
  <div id="wrapper">
  <div id="slideshow">
    <img src="image1.jpg" alt="Slideshow Image 1" class="active" />
    <img src="image2.jpg" alt="Slideshow Image 2" />
    <img src="image3.jpg" alt="Slideshow Image 3" />
	</div><!--end slideshow -->
    <div id="header">
      <h1><a href="http://www.petitcafe."><img src="images/logo.jpg" alt="Petit Cafe" /></a></h1>
      <ul id="nav">
        <li><a href="http://www.petitcafe.">INICIO</a> &nbsp;|&nbsp; </li>
        <li><a href="http://www.petitcafe.">CARTA</a> &nbsp;|&nbsp; </li>
        <li><a href="http://www.petitcafe.">POSTRES</a> &nbsp;|&nbsp; </li>
        <li><a href="http://www.petitcafe.">VINOS</a> &nbsp;|&nbsp; </li>
        <li><a href="http://www.petitcafe.">RESERVAS</a> &nbsp;|&nbsp; </li>
        <li><a href="http://www.petitcafe.">CONTACTO</a></li>
      </ul><!-- end nav -->
      <div id="welcome">
        <h2><img src="images/title_welcome_es.gif" alt="Bienvenidos" /></h2>
        <p>Situados en Santa Pon&ccedil;a desde 19xx. Ofrecemos comida internacional y autoctona con los ingredientes m&aacute;s fresos y naturales. Local climatizado, con TV, m&uacute;sica y WI-FI abierto, y terraza con vistas al mar, para disfrutar de un ambiente familiar y agradable.</p>
	<p>Abrimos de Lunes a Viernes de xxxxxxxx y los xxxxxxx.
      </div><!-- end welcome -->
	</div><!-- end header -->
    <div id="body"><div id="body-i">
      <h2 id="hspecials"><img src="images/title_menus.gif" alt="Our Special Menus" /></h2>
      <div id="specials">
        <div style="background-image: url(images/picture_1.jpg);" class="imagebox">
          <h3><a href="http://www.petitcafe.">Ensalada Vegetariana</a></h3>
          <p>Arroz, tom&aacute;te, lechuga, xxxxxxxxxx........</p>
          <p><h3>6,00 &euro;</h3></p>
          <p class="readmore"><a href="http://www.petitcafe.">... +</a></p>
        </div>
        <div style="background-image: url(images/picture_2.jpg);" class="imagebox">
          <h3><a href="http://www.petitcafe.">Nombre menu</a></h3>
          <p>Texto de prueba. Texto de prueba. Texto de prueba. </p>
          <p class="readmore"><a href="http://www.petitcafe.">... +</a></p>
        </div>
        <div style="background-image: url(images/picture_3.jpg);" class="imagebox">
          <h3><a href="http://www.petitcafe.">Nombre menu</a></h3>
          <p>Texto de prueba. Texto de prueba. Texto de prueba. </p>
          <p class="readmore"><a href="http://www.petitcafe.">... +</a></p>
        </div>
      </div><!-- end specials -->
      <h2 id="hevents"><img src="images/title_events.gif" alt="Special Events" /></h2>
      <div id="events">
        <h3><a href="http://www.petitcafe.">11.06.2010</a></h3>
        <p>Empieza el Mundial Sud&aacute;frica 2010. </p>
        <p class="readmore"><a href="http://www.petitcafe.">... +</a></p>
        <h3><a href="http://www.petitcafe.">03.04.2010</a></h3>
        <p>Texto de prueba. Texto de prueba. Texto de prueba. </p>
        <p class="readmore"><a href="http://www.petitcafe.">... +</a></p>
        <h3><a href="http://www.petitcafe.">04.04.2010</a></h3>
        <p>Texto de prueba. Texto de prueba. Texto de prueba. </p>
        <p class="readmore"><a href="http://www.petitcafe.">... +</a></p>
        <h3><a href="http://www.petitcafe.">05.04.2010</a></h3>
        <p>Texto de prueba. Texto de prueba. Texto de prueba. </p>
        <p class="readmore"><a href="http://www.petitcafe.">... +</a></p>
      </div><!-- end events -->
      <div class="clear" id="spacer"></div>
    </div></div><!-- end body -->
    <div id="hotstuff">
      <h2><img src="images/title_hot.gif" alt="Today's Hot" /></h2>
      <div style="background-image: url(images/spotify.png);" id="hot-one" class="imagebox">
        <h3><a href="http://www.petitcafe.">M&uacute;sica ambiental</a></h3>
        <p>La mejor m&uacute;sica ambiente con Spotify.</p>
<br><br>
      </div>
      <div style="background-image: url(images/wifi.png);" id="hot-two" class="imagebox">
        <h3><a href="http://www.petitcafe.">Wi-Fi Gratis</a></h3>
        <p>Disponemos de zona Wi-Fi abierta de alta velocidad para nuestros clientes.</p>
      </div>
      <div style="background-image: url(images/facebook.png);" id="hot-three" class="imagebox">
        <h3><a href="http://www.petitcafe.">S&iacute;guenos en Facebook</a></h3>
        <p>Nuestros enlaces:</p>
	<h3><a href="http://www.motoclubmallorca.com">MotoClub Mallorca</a></h3>
      </div>
      <div class="clear"></div>
    </div><!-- end hotstuff -->
  </div><!-- end wrapper -->
  <div id="footer">
    (c) <a href="http://www.petitcafe.">www.petitcafe.<a> 2010. Rei Jaume I , 88 Santa Pon&ccedil;a - 07180 Calvi&agrave - (Baleares) Tel. 971 695 136<br><br>
	Web creada por <a href="http://www.xyzdesign.es">XYZdesign</a>
  </div><!-- end footer -->
</body>
</html> 

Última edición por xyz3d; 11/05/2010 a las 12:23